All Bundles
JsonElement
JSON value element
Operations
New
Constructor
New(type:JsonElement->JsonType)
Parameters
Constructor
New(type:JsonElement->JsonType, value:String)
Parameters
Constructor
New(value:String)
Parameters
Name | Type | Description |
---|
value | String | Json string value |
Constructor
New(value:Int)
Parameters
Name | Type | Description |
---|
value | Int | Json integer value |
Constructor
New(value:Float)
Parameters
Name | Type | Description |
---|
value | Float | Json float value |
Constructor
New(array_elems:Vector<JsonElement>)
Parameters
Constructor
New(map_elems:Map<String,JsonElement>)
Parameters
Add
Adds an element
method : public : Add(elem:JsonElement) ~ Bool
Parameters
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Adds a value
method : public : Add(value:String) ~ Bool
Parameters
Name | Type | Description |
---|
value | String | value |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Adds a value
method : public : Add(value:Int) ~ Bool
Parameters
Name | Type | Description |
---|
value | Int | value |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Adds a value
method : public : Add(value:Float) ~ Bool
Parameters
Name | Type | Description |
---|
value | Float | value |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Adds a value
method : public : Add(value:Bool) ~ Bool
Parameters
Name | Type | Description |
---|
value | Bool | value |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
AddChild
Adds a class child node
method : public : AddChild(name:String) ~ JsonElement
Parameters
Name | Type | Description |
---|
name | String | class name |
Return
Decode
General decoding for Json strings
function : native : Decode(str:String) ~ String
Parameters
Name | Type | Description |
---|
str | String | encoded string |
Return
Type | Description |
---|
String | decoded string |
Encode
General encoding for JSON strings
function : native : Encode(str:String) ~ String
Parameters
Name | Type | Description |
---|
str | String | decoded string |
Return
Type | Description |
---|
String | encoding string |
FindElements
Queries the object graph. Object attributes referenced by '/' while array elements are referenced by '[index]'. Example "cars/[last]/make".
method : public : FindElements(path:String) ~ JsonElement
Parameters
Name | Type | Description |
---|
path | String | query path |
Return
Get
Gets an indexed value from an array type
method : public : Get(index:Int) ~ JsonElement
Parameters
Name | Type | Description |
---|
index | Int | index |
Return
Gets a named value from an object type
method : public : Get(name:String) ~ JsonElement
Parameters
Name | Type | Description |
---|
name | String | element name |
Return
GetBool
Gets the float value
method : public : GetBool() ~ Bool
Return
Type | Description |
---|
Bool | float value |
GetFloat
Gets the float value
method : public : GetFloat() ~ Float
Return
Type | Description |
---|
Float | float value |
GetInt
Gets the integer value
method : public : GetInt() ~ Int
Return
Type | Description |
---|
Int | integer value |
GetNames
Gets the names of object attributes
method : public : GetNames() ~ Vector<String>
Return
GetString
Gets the string value
method : public : GetString() ~ String
Return
Type | Description |
---|
String | string value |
GetType
Gets the type
method : public : GetType() ~ JsonElement->JsonType
Return
GetValue
Gets the string value
method : public : GetValue() ~ String
Return
Type | Description |
---|
String | string value |
Has
Check to see if the indexed value exists
method : public : Has(index:Int) ~ Bool
Parameters
Name | Type | Description |
---|
index | Int | index |
Return
Type | Description |
---|
Bool | true if exists, false otherwise |
Check to see if the indexed value exists
method : public : Has(name:String) ~ Bool
Parameters
Name | Type | Description |
---|
name | String | element name |
Return
Type | Description |
---|
Bool | true if exists, false otherwise |
Insert
Insert an element
method : public : Insert(name:String, elem:JsonElement) ~ Bool
Parameters
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Inserts a value
method : public : Insert(name:String, value:String) ~ Bool
Parameters
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Inserts a value
method : public : Insert(name:String, value:Int) ~ Bool
Parameters
Name | Type | Description |
---|
name | String | value name |
value | Int | value |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Inserts a value
method : public : Insert(name:String, value:Float) ~ Bool
Parameters
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
Inserts a value
method : public : Insert(name:String, value:Bool) ~ Bool
Parameters
Name | Type | Description |
---|
name | String | value name |
value | Bool | value |
Return
Type | Description |
---|
Bool | true if successful, false otherwise |
IsNull
Checks for 'null' JSON value
method : public : IsNull() ~ Bool
Return
Type | Description |
---|
Bool | true if 'null', false otherwise |
Checks for 'null' JSON value
function : IsNull(elem:JsonElement) ~ Bool
Parameters
Return
Type | Description |
---|
Bool | true if 'null', false otherwise |
MatchType
Checks a node's type
function : MatchType(elem:JsonElement, type:JsonElement->JsonType) ~ Bool
Parameters
Return
Type | Description |
---|
Bool | true of matching, false otherwise |
MatchValue
Checks a node's type
function : MatchValue(elem:JsonElement, value:String) ~ Bool
Parameters
Return
Type | Description |
---|
Bool | true of matching, false otherwise |
Size
Gets the size of an array or object value
method : public : Size() ~ Int
Return
Type | Description |
---|
Int | size of an array or object value |
ToFormattedString
Stringify and format the JSON element
method : public : ToFormattedString() ~ String
Return
Type | Description |
---|
String | formatted JSON string |
ToString
Stringify the JSON element
method : public : ToString() ~ String
Return
Type | Description |
---|
String | JSON string |