JSONWriter.WriteValue

Syntax:

WriteValue(<Value>, <UseFormatWithExponent>)

Parameters:

<Value> (required)

Type: String; Number; Boolean; Undefined.
The written value.

<UseFormatWithExponent> (optional)

Type: Boolean.
The usage of the exponent form of record for the numerical values. The parameter is only reasonable if a numerical type of value is recorded.
Default value: False.

Description:

Records JSON property value.

Availability:

Thin client, server, thick client, external connection.

Example:

JSONWriter = New JSONWriter;
// Writing the JSON document
// Writing the string value
JSONWriter.WritePropertyName("String");
JSONWriter.WriteValue("String number");
// Writing the number value
JSONWriter.WritePropertyName("Number");
JSONWriter.WriteValue(123);
//  Writing the floating point value
// in scientific notafic notation
JSONWriter.WritePropertyName("NumberInScientificNotation");
JSONWriter.WriteValue(123.45);
// Writing the boolean value
JSONWriter.WritePropertyName("Boolean");
JSONWriter.WriteValue(True);
// Writing the Undefined value
JSONWriter.WritePropertyName("Undefined");
JSONWriter.WriteValue(Undefined);


    

1C:Enterprise Developer's Community