KGy SOFT

JsonValueType Enumeration

KGy SOFT JSON Libraries Help
Represents the possible values of the Type property of a JsonValue instance.

Namespace:  KGySoft.Json
Assembly:  KGySoft.Json (in KGySoft.Json.dll) Version: 2.0.0
Syntax

public enum JsonValueType
Members

  Member nameValueDescription
UnknownLiteral-1 The JsonValue contains an unknown JSON literal. Can occur when parsing an invalid JSON or when the JsonValue was created by the CreateLiteralUnchecked method. If the Type property of a JsonValue instance is UnknownLiteral, then both AsLiteral and ToString return the actual value.
Undefined0 Represents the undefined type in JavaScript. This is the Type of a default JsonValue instance and also the Undefined field. If the Type property of a JsonValue instance is Undefined, then IsUndefined returns , and both AsLiteral and ToString return undefined.
Null1 Represents the null type in JavaScript. This is the Type of the Null field. If the Type property of a JsonValue instance is Null, then IsNull returns , and both AsLiteral and ToString return null.
Boolean2 Represents the Boolean type in JavaScript. This is the Type of the True and False fields. If the Type property of a JsonValue instance is Boolean, then AsBoolean returns the actual value, and both AsLiteral and ToString return its string representation.
Number3 Represents the Number type in JavaScript. The actual number is always stored as a string in JsonValue. If the Type property of a JsonValue instance is Number, then AsNumber returns the represented value using the same precision as JavaScript does, whereas AsLiteral and ToString return the actual underlying value preserving the original precision.
See also the Remarks section of the AsNumber property for details.
String4 Represents the String type in JavaScript. If the Type property of a JsonValue instance is String, then both AsString and AsLiteral return the actual string, wheres ToString returns the JSON representation with the added quotes and possible escape characters.
Array5 Represents the Array type in JavaScript. If the Type property of a JsonValue instance is Array, then AsArray returns a non- instance, the elements can be accessed by the int value indexer, and ToString returns the JSON representation of the array.
Object6 Represents the Object type in JavaScript. If the Type property of a JsonValue instance is Object, then AsObject returns a non- instance, the property values can be accessed by the string value indexer, and ToString returns the JSON representation of the object.
See Also

Reference