편집

다음을 통해 공유


JsonValue Data type

Version: Available or changed with runtime version 1.0.

Is a container for any well-formed fundamental JSON value. A default JsonValue is set to the JSON value of NULL.

Instance methods

The following methods are available on instances of the JsonValue data type.

Method name Description
AsBigInteger() Converts the value in a JsonValue to an BigInteger data type.
AsBoolean() Converts the value in a JsonValue to a Boolean data type.
AsByte() Converts the value in a JsonValue to a Byte data type.
AsChar() Converts the value in a JsonValue to a Char data type.
AsCode() Converts the value in a JsonValue to a Code data type.
AsDate() Converts the value in a JsonValue to a Date data type.
AsDateTime() Converts the value in a JsonValue to a DateTime data type.
AsDecimal() Converts the value in a JsonValue to a Decimal data type.
AsDuration() Converts the value in a JsonValue to a Duration data type.
AsInteger() Converts the value in a JsonValue to an Integer data type.
AsOption() Converts the value in a JsonValue to an Option data type.
AsText() Converts the value in a JsonValue to a Text data type.
AsTime() Converts the value in a JsonValue to a Time data type.
AsToken() Converts the value in a JsonValue to a JsonToken data type.
Clone() Creates a deep-copy of the JsonToken value.
IsNull() Indicates whether the JsonValue contains the JSON value of NULL.
IsUndefined() Indicates whether the JsonValue contains the JSON value of UNDEFINED.
Path() Retrieves the JSON path of the value relative to its containing tree.
ReadFrom(Text) Reads the JSON data into a JsonValue variable.
ReadFrom(InStream) Reads the JSON data from the stream into a JsonValue variable.
SelectToken(Text, var JsonToken) Selects a JsonToken using a JPath expression.
SetValue(Boolean) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValue(Char) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValue(Byte) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValue(Option) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValue(Integer) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValue(BigInteger) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValue(Decimal) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValue(Duration) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValue(Date) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValue(Time) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValue(DateTime) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValue(Text) Set the contents of the JsonValue variable to the JSON representation of the given value.
SetValueToNull() Set the contents of the JsonValue variable to the JSON representation of NULL.
SetValueToUndefined() Set the contents of the JsonValue variable to the JSON representation of UNDEFINED.
WriteTo(var Text) Serializes and writes the JSON data of the JsonValue to a given object.
WriteTo(OutStream) Serializes and writes the JSON data of the JsonValue to a given object.

Note

For performance reasons all HTTP, JSON, TextBuilder, and XML types are reference types, not value types. Reference types holds a pointer to the data elsewhere in memory, whereas value types store its own data.

Get Started with AL
Developing Extensions