I​Json​Value I​Json​Value I​Json​Value Interface

Definition

Encapsulates a JSON value.

public : interface IJsonValuepublic interface IJsonValuePublic Interface IJsonValue
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

ValueType ValueType ValueType

Gets the type of the encapsulated JSON value. Possible types are defined by JsonValueType.

public : JsonValueType ValueType { get; }public JsonValueType ValueType { get; }Public ReadOnly Property ValueType As JsonValueType
Value
JsonValueType JsonValueType JsonValueType

The JSON value type.

Attributes

Methods

GetArray() GetArray() GetArray()

Returns a pointer to the array if the ValueType of the encapsulated value is Array. If it is not, an exception is thrown.

public : JsonArray GetArray()public JsonArray GetArray()Public Function GetArray() As JsonArray
Returns

A pointer to the encapsulated array.

Attributes

GetBoolean() GetBoolean() GetBoolean()

Returns the Boolean if the ValueType of the encapsulated value is Boolean. If it is not, an exception is thrown.

public : PlatForm::Boolean GetBoolean()public bool GetBoolean()Public Function GetBoolean() As bool
Returns
PlatForm::Boolean bool bool

The encapsulated value.

Attributes

GetNumber() GetNumber() GetNumber()

Returns the number (a Double) if the ValueType of the encapsulated value is Number. If it is not, an exception is thrown.

public : double GetNumber()public double GetNumber()Public Function GetNumber() As double
Returns
double double double

The encapsulated value.

Attributes

GetObject() GetObject() GetObject()

Returns a pointer to the object if the ValueType of the encapsulated value is Object. If it is not, an exception is thrown.

public : JsonObject GetObject()public JsonObject GetObject()Public Function GetObject() As JsonObject
Returns

A pointer to the encapsulated object.

Attributes

GetString() GetString() GetString()

Returns the String if the ValueType of the encapsulated value is String. If it is not, an exception is thrown.

public : PlatForm::String GetString()public string GetString()Public Function GetString() As string
Returns
PlatForm::String string string

The encapsulated String value.

Attributes

Stringify() Stringify() Stringify()

Retrieves the JSON representation of the encapsulated value.

public : PlatForm::String Stringify()public string Stringify()Public Function Stringify() As string
Returns
PlatForm::String string string

A JSON representation of the encapsulated value.

Attributes

Remarks

If the ValueType is String, then the returned string will be properly escaped and double quoted. This method is used for serializing the encapsulated value into a valid JSON format.