Skip to content

Commit dc6eb34

Browse files
Describe storeDefaults in toJSON() (#9706)
1 parent b9e6d15 commit dc6eb34

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/survey-core/src/base.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,18 +417,21 @@ export class Base {
417417
}
418418

419419
/**
420-
* Returns a JSON object that corresponds to the current SurveyJS object.
420+
* Returns a JSON schema that corresponds to the current survey element.
421+
* @param options An object with configuration options.
422+
* @param {boolean} options.storeDefaults Pass `true` the JSON schema should include properties with default values.
423+
* @returns A JSON schema of the survey element.
421424
* @see fromJSON
422425
*/
423426
public toJSON(options?: ISaveToJSONOptions): any {
424427
return new JsonObject().toJsonObject(this, options);
425428
}
426429
/**
427-
* Assigns a new configuration to the current SurveyJS object. This configuration is taken from a passed JSON object.
430+
* Assigns a new JSON schema to the current survey element.
428431
*
429-
* The JSON object should contain only serializable properties of this SurveyJS object. Event handlers and properties that do not belong to the SurveyJS object are ignored.
432+
* The JSON schema should contain only serializable properties of this survey element. Event handlers and properties that do not belong to the survey element are ignored.
430433
*
431-
* @param json A JSON object with properties that you want to apply to the current SurveyJS object.
434+
* @param json A JSON schema that you want to apply to the current survey element.
432435
* @param options An object with configuration options.
433436
* @param {boolean} options.validatePropertyValues Pass `true` if you want to validate property values. Use the [`jsonErrors`](#jsonErrors) array to access validation errors.
434437
* @see toJSON

0 commit comments

Comments
 (0)