public enum JsonValueType
Public Enumeration JsonValueType
public enum class JsonValueType
type JsonValueType
Undefined | 0 | 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. |
Null | 1 | 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. |
Boolean | 2 | 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. |
Number | 3 |
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. |
String | 4 | 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. |
Array | 5 | 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. |
Object | 6 | 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. |
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. |