ISaveToJSONOptions
An interface with configuration options that control how a SurveyModel instance is serialized by the toJSON() method.
Specifies the locales to include in the exported JSON schema. Applies only when storeLocaleStrings is true or "stringsOnly".
- Type:
- string[] readonly
- Implemented in:
- ISaveToJSONOptions
Specifies whether the exported JSON schema should include properties whose values are equal to their defaults.
Default value: false
- Type:
- boolean readonly
- Implemented in:
- ISaveToJSONOptions
Specifies how locale-specific strings are handled during JSON export.
Possible values:
true(default)
Export the full JSON schema, including all locale strings. Use thelocalesarray to restrict the output to specific locales.false
Export the JSON schema without any textual content."stringsOnly"
Export a JSON schema that contains only locale strings and the minimal set of properties required to identify survey elements. Use thelocalesarray to restrict the output to specific locales. To apply a locale-strings-only schema to a survey model, call themergeLocalizationJSON(json, locales)method.
As an alternative to calling
toJSON()with"stringsOnly", you can call thegetLocalizationJSON(locales)method, which is syntactic sugar.
- Type:
- boolean | "stringsOnly" readonly
- Implemented in:
- ISaveToJSONOptions
Send feedback to the SurveyJS team
Need help? Visit our support page