JSONNode

A node within a json tree. Careful when holding references, as changes to the tree can invalidate them.

Methods

bool isNull( )

Returns bool : Whether the node is a null.

bool isFalse( )

Returns bool : Whether the node is a false.

bool isTrue( )

Returns bool : Whether the node is a true.

bool isBool( )

Returns bool : Whether the node is a boolean value (true or false).

bool isObject( )

Returns bool : Whether the node is an object / mapping.

bool isArray( )

Returns bool : Whether the node is an array.

bool isNumber( )

Returns bool : Whether the node is a numerical type.

bool isInt( )

Returns bool : Whether the node is an integer.

bool isUint( )

Returns bool : Whether the node is an unsigned integer.

bool isInt64( )

Returns bool : Whether the node is an long integer.

bool isUint64( )

Returns bool : Whether the node is an long unsigned integer.

bool isDouble( )

Returns bool : Whether the node is a double.

bool isString( )

Returns bool : Whether the node is a string.

JSONNode setNull( )

Set this node to a null value. Returns JSONNode : This node.

JSONNode setBool( bool value )

Set this node to a boolean value. Returns JSONNode : This node.

JSONNode makeArray( )

Set this node to be an array. Returns JSONNode : This node.

JSONNode makeObject( )

Set this node to be an object. Returns JSONNode : This node.

JSONNode setInt( int value )

Set this node to an int value. Returns JSONNode : This node.

JSONNode setUint( uint value )

Set this node to an unsigned int value. Returns JSONNode : This node.

JSONNode setInt64( int64 value )

Set this node to a long int value. Returns JSONNode : This node.

JSONNode setUint64( uint64 value )

Set this node to a long unsigned int value. Returns JSONNode : This node.

JSONNode setDouble( double value )

Set this node to a double value. Returns JSONNode : This node.

JSONNode setString( string& value )

Set this node to a string value. Returns JSONNode : This node.

JSONNode opAssign( int value )

Set this node to an int value. Returns JSONNode : This node.

JSONNode opAssign( uint value )

Set this node to an unsigned int value. Returns JSONNode : This node.

JSONNode opAssign( int64 value )

Set this node to a long int value. Returns JSONNode : This node.

JSONNode opAssign( uint64 value )

Set this node to a long unsigned int value. Returns JSONNode : This node.

JSONNode opAssign( double value )

Set this node to a double value. Returns JSONNode : This node.

JSONNode opAssign( string& value )

Set this node to a string value. Returns JSONNode : This node.

string getString( )

Returns string : The string value of the node.

bool getBool( )

Returns bool : The boolean value of the node.

int getInt( )

Returns int : The integer value of the node.

uint getUint( )

Returns uint : The unsigned integer value of the node.

int64 getInt64( )

Returns int64 : The long integer value of the node.

uint64 getUint64( )

Returns uint64 : The long unsigned integer value of the node.

double getDouble( )

Returns double : The double value of the node.

double getNumber( )

Returns double : The numeric value of the node.

JSONNode@ findMember( string& name )

Retrieve a member node from an object. Returns JSONNode@ : Reference to the member node. Null if it does not exist.

JSONNode@ getMember( string& name )

Retrieve a member node from an object, creating it if it does not exist. Returns JSONNode@ : Reference to the member node, can be a newly created null node.

JSONNode@ opIndex( string& name )

Retrieve a member node from an object, creating it if it does not exist. Returns JSONNode@ : Reference to the member node, can be a newly created null node.

void removeMember( string& name )

Remove a member from an object.

void clearItems( )

Clear all items from an array node.

JSONNode@ getItem( uint index )

Get an item from an array node. Returns JSONNode@ : Node at the specified index in the array.

JSONNode@ opIndex( uint index )

Get an item from an array node. Returns JSONNode@ : Node at the specified index in the array.

uint size( )

Returns uint : The size of the array node.

void reserve( uint amount )

Reserve an array node to hold an amount of items.

JSONNode@ pushBack( )

Add a new node to the end of an array node. Returns JSONNode@ : Newly created null node.

void popBack( )

Remove a node from the end of an array node.