Online Maps v3
Loading...
Searching...
No Matches
OnlineMapsJSONItem Class Referenceabstract

The base class of JSON elements. More...

Inheritance diagram for OnlineMapsJSONItem:
OnlineMapsJSONArray OnlineMapsJSONObject OnlineMapsJSONValue

Public Member Functions

virtual OnlineMapsJSONItem AppendObject (object obj)
 Serializes the object and adds to the current json node.
 
ChildValue< T > (string childName)
 Returns the value of the child element, converted to the specified type.
 
Deserialize< T > ()
 Deserializes current element.
 
object Deserialize (Type type)
 Deserializes current element.
 
OnlineMapsJSONItem GetAll (string key)
 Get all elements with the key on the first or the deeper levels of the current element.
 
void ToJSON (StringBuilder b)
 Converts the current and the child elements to JSON string.
 
object Value (Type type)
 Returns the value of the element, converted to the specified type.
 
virtual T Value< T > ()
 Returns the value of the element, converted to the specified type.
 
V< T > ()
 Returns the value of the element, converted to the specified type.
 
V< T > (string childName)
 Returns the value of the child element, converted to the specified type.
 

Properties

OnlineMapsJSONItem this[int index] [get]
 Get the element by index.
 
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.

 

Detailed Description

The base class of JSON elements.

Member Function Documentation

◆ AppendObject()

virtual OnlineMapsJSONItem OnlineMapsJSONItem.AppendObject ( object obj)
virtual

Serializes the object and adds to the current json node.

Parameters
objObject
Returns
Current json node

Reimplemented in OnlineMapsJSONObject.

◆ ChildValue< T >()

T OnlineMapsJSONItem.ChildValue< T > ( string childName)

Returns the value of the child element, converted to the specified type.

Template Parameters
TType of variable
Parameters
childNameChild element key
Returns
Value

◆ Deserialize()

object OnlineMapsJSONItem.Deserialize ( Type type)
abstract

Deserializes current element.

Parameters
typeType
Returns
Object

◆ Deserialize< T >()

Deserializes current element.

Template Parameters
TType
Returns
Object

◆ GetAll()

OnlineMapsJSONItem OnlineMapsJSONItem.GetAll ( string key)
abstract

Get all elements with the key on the first or the deeper levels of the current element.

Parameters
keyKey
Returns
Elements

◆ ToJSON()

void OnlineMapsJSONItem.ToJSON ( StringBuilder b)
abstract

Converts the current and the child elements to JSON string.

Parameters
bStringBuilder instance

◆ V< T >() [1/2]

T OnlineMapsJSONItem.V< T > ( )

Returns the value of the element, converted to the specified type.

Template Parameters
TType of variable
Returns
Value

◆ V< T >() [2/2]

T OnlineMapsJSONItem.V< T > ( string childName)

Returns the value of the child element, converted to the specified type.

Template Parameters
TType of variable
Parameters
childNameChild element key
Returns
Value

◆ Value()

object OnlineMapsJSONItem.Value ( Type type)
abstract

Returns the value of the element, converted to the specified type.

Parameters
typeType of variable
Returns
Value

◆ Value< T >()

virtual T OnlineMapsJSONItem.Value< T > ( )
virtual

Returns the value of the element, converted to the specified type.

Template Parameters
TType of variable
Returns
Value

Property Documentation

◆ this[int index]

OnlineMapsJSONItem OnlineMapsJSONItem.this[int index]
getabstract

Get the element by index.

Parameters
indexIndex of element
Returns
Element

◆ this[string key]

OnlineMapsJSONItem OnlineMapsJSONItem.this[string key]
getabstract

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.

Parameters
keyElement key
Returns
Element