Online Maps
v3
|
The base class of JSON elements. More...
Public Member Functions | |
virtual OnlineMapsJSONItem | AppendObject (object obj) |
Serializes the object and adds to the current json node. More... | |
T | ChildValue< T > (string childName) |
Returns the value of the child element, converted to the specified type. More... | |
T | Deserialize< T > () |
Deserializes current element More... | |
abstract object | Deserialize (Type type) |
Deserializes current element More... | |
abstract OnlineMapsJSONItem | GetAll (string key) |
Get all elements with the key on the first or the deeper levels of the current element. More... | |
abstract void | ToJSON (StringBuilder b) |
Converts the current and the child elements to JSON string. More... | |
abstract object | Value (Type type) |
Returns the value of the element, converted to the specified type. More... | |
virtual T | Value< T > () |
Returns the value of the element, converted to the specified type. More... | |
T | V< T > () |
Returns the value of the element, converted to the specified type. More... | |
T | V< T > (string childName) |
Returns the value of the child element, converted to the specified type. More... | |
Properties | |
abstract OnlineMapsJSONItem | this[int index] [get] |
Get the element by index More... | |
abstract OnlineMapsJSONItem | this[string key] [get] |
Get the element by key. Supports XPath like selectors: ["key"] - get element by key. ["key1/key2"] - get element key2, which is a child of the element key1. ["key/N"] - where N is number. Get array element by index N, which is a child of the element key1. ["key/*"] - get all array elements, which is a child of the element key1. ["//key"] - get all elements with the key on the first or the deeper levels of the current element. More... | |
The base class of JSON elements.
|
virtual |
Serializes the object and adds to the current json node.
obj | Object |
Reimplemented in OnlineMapsJSONObject.
T OnlineMapsJSONItem.ChildValue< T > | ( | string | childName | ) |
Returns the value of the child element, converted to the specified type.
T | Type of variable |
childName | Child element key |
|
pure virtual |
Deserializes current element
type | Type |
Implemented in OnlineMapsJSONValue, OnlineMapsJSONObject, and OnlineMapsJSONArray.
T OnlineMapsJSONItem.Deserialize< T > | ( | ) |
Deserializes current element
T | Type |
|
pure virtual |
Get all elements with the key on the first or the deeper levels of the current element.
key | Key |
Implemented in OnlineMapsJSONValue, OnlineMapsJSONObject, and OnlineMapsJSONArray.
|
pure virtual |
Converts the current and the child elements to JSON string.
b | StringBuilder instance |
Implemented in OnlineMapsJSONValue, OnlineMapsJSONObject, and OnlineMapsJSONArray.
T OnlineMapsJSONItem.V< T > | ( | ) |
Returns the value of the element, converted to the specified type.
T | Type of variable |
T OnlineMapsJSONItem.V< T > | ( | string | childName | ) |
Returns the value of the child element, converted to the specified type.
T | Type of variable |
childName | Child element key |
|
pure virtual |
Returns the value of the element, converted to the specified type.
type | Type of variable |
Implemented in OnlineMapsJSONObject, OnlineMapsJSONArray, and OnlineMapsJSONValue.
|
virtual |
Returns the value of the element, converted to the specified type.
T | Type of variable |
|
get |
Get the element by index
index | Index of element |
|
get |
Get the element by key.
Supports XPath like selectors:
["key"] - get element by key.
["key1/key2"] - get element key2, which is a child of the element key1.
["key/N"] - where N is number. Get array element by index N, which is a child of the element key1.
["key/*"] - get all array elements, which is a child of the element key1.
["//key"] - get all elements with the key on the first or the deeper levels of the current element.
key | Element key |