XDTOFactory.ReadJSON

Syntax:

ReadJSON(<JSONReader>, <Type>, <ReviverFunctionName>, <ReviverFunctionModule>, <ReviverFunctionAdditionalParameters>, <TypesToRevive>, <PropertiesToReviveNames>)

Parameters:

<JSONReader> (required)

Type: JSONReader.
JSON reader object.

<Type> (optional)

Type: XDTOValueType; XDTOObjectType.
XDTO data item type. If the type is not specified, the data type is defined by the current state of the JSONReader.

<ReviverFunctionName> (optional)

Type: DynamicalListGroupRow.
Value restoration function name.
The function must have the following parameters:
  • <Property> - a value of the String type,
  • <Type> - a value of the XDTOObjectType type,
  • <Value> - a value of the type allowed for serialization,
  • <AdditionalParameters>.
The returned value is a type allowed for XDTO serialization.
Default value: Undefined.

<ReviverFunctionModule> (optional)

Type: ManagedForm; CommandInterfaceCommand; CommonModule.
Specifies the module, the procedure of which will be used for value restoration. The proper method will be called depending on the type of the parameter:
  • ManagedForm - the method of the module of the specified manageable form will be called.
  • CommandInterfaceCommand - the method of the command module of the command interface will be called.
  • CommonModule - the method of the shared nonglobal module will be called.

Default value: Undefined.

<ReviverFunctionAdditionalParameters> (optional)

Type: Arbitrary.
Additional parameters for the value recovery function.
Default value: Undefined.

<TypesToRevive> (optional)

Type: Array.
Array of XDTOObjectType objects that correspond to XDTO types for which the recovery function needs to be called.
If the recovery function has not been specified, the TypesToRevive and PropertiesToReviveNames parameters are ignored.

<PropertiesToReviveNames> (optional)

Type: Array.
Property names that require calling a recovery function.
If the recovery function has not been specified, the TypesToRevive and PropertiesToReviveNames parameters are ignored.

Description:

Reads XDTO data item of the specified type from XML reader object.

Availability:

Thin client, server, thick client, external connection.

Note:

Return value can have any type that supports serialization to XDTO.

    

1C:Enterprise Developer's Community