Online Maps v3
Loading...
Searching...
No Matches
OnlineMapsJSONArray Class Reference

The wrapper for an array of JSON elements. More...

Inheritance diagram for OnlineMapsJSONArray:
OnlineMapsJSONItem

Public Member Functions

 OnlineMapsJSONArray ()
 Constructor.
 
void Add (OnlineMapsJSONItem item)
 Adds an element to the array.
 
void AddRange (OnlineMapsJSONArray collection)
 Adds an elements to the array.
 
- Public Member Functions inherited from OnlineMapsJSONItem
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.
 

Static Public Member Functions

static OnlineMapsJSONArray ParseArray (string json)
 Parse a string that contains an array.
 

Properties

int count [get]
 Count elements.
 
- Properties inherited from OnlineMapsJSONItem
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 wrapper for an array of JSON elements.

Member Function Documentation

◆ Add()

void OnlineMapsJSONArray.Add ( OnlineMapsJSONItem item)

Adds an element to the array.

Parameters
itemElement

◆ AddRange()

void OnlineMapsJSONArray.AddRange ( OnlineMapsJSONArray collection)

Adds an elements to the array.

Parameters
collectionArray of elements

◆ ParseArray()

static OnlineMapsJSONArray OnlineMapsJSONArray.ParseArray ( string json)
static

Parse a string that contains an array.

Parameters
jsonJSON string
Returns
Instance