Skip to content

Render Forms Through JSON

This guide explains how to export JSON data and restore forms.

Note

You must use formCreate.parseJson instead of JSON.parse, and use formCreate.toJson instead of JSON.stringify to convert JSON data to ensure the data format is correct.

Generate JSON Data

Using the api.toJson (or formCreate.toJson) method, you can export the current form's data and configuration as JSON format. This is useful when you need to save form state or exchange data.

JSON Data Echo

Using the formCreate.parseJson method, you can parse JSON data into form configuration to restore form state. This method is suitable for scenarios where JSON data is obtained from storage or APIs and the form needs to be re-rendered.

FormCreate is an open-source project released under the MIT License. Free for personal and commercial use.