JSONArray

JSONArray represents a single JSON array, capable of being heterogenous

Constructors

this
this()
Undocumented in source.

Members

Functions

length
ulong length()

Allow the user to get the number of elements in this object

opApply
int opApply(int delegate(ref JSONType) dg)

Operator overload for foreach iteration through the array with values only and allow modification of the reference

opApply
int opApply(int delegate(ref ulong, ref JSONType) dg)

Operator overload for foreach iteration through the array with key and value and allow modification of the reference

opCatAssign
void opCatAssign(JSONType child)
void opCatAssign(string val)
void opCatAssign(bool val)
void opCatAssign(long val)
void opCatAssign(real val)
void opCatAssign(int val)

Operator overload to allow addition of children

opIndex
JSONType opIndex(int key)

Operator overload to allow access of children

parse
void parse(string source)

This function parses a JSONArray out of a string

toPrettyString
string toPrettyString(string indent)

A method to convert this JSONArray to a formatted, user-readable format.

toString
string toString()

A method to convert this JSONArray to a user-readable format.

Variables

_children
JSONType[] _children;
Undocumented in source.

Inherited Members

From JSONType

toString
string toString()
Undocumented in source.
toPrettyString
string toPrettyString(string indent)
Undocumented in source.
parse
void parse(string source)

The parse method of this interface should ALWAYS be destructive, removing things from the front of source as it parses.

toJSONObject
JSONObject toJSONObject()

Convenience function for casting to JSONObject

toJSONArray
JSONArray toJSONArray()

Convenience function for casting to JSONArray

toJSONString
JSONString toJSONString()

Convenience function for casting to JSONString

toJSONBoolean
JSONBoolean toJSONBoolean()

Convenience function for casting to JSONBoolean

toJSONNumber
JSONNumber toJSONNumber()

Convenience function for casting to JSONNumber

toJSONNull
JSONNull toJSONNull()

Convenience function for casting to JSONNull

opIndex
JSONType opIndex(string key)

Associative array index function for objects describing associative array-like attributes.

opApply
int opApply(int delegate(ref string, ref JSONType) dg)

Allow foreach over the object with string key and ref value.

opIndex
JSONType opIndex(int key)

Array index function for objects describing array-like attributes.

opApply
int opApply(int delegate(ref ulong, ref JSONType) dg)

Allow foreach over the object with integer key and ref value.

opApply
int opApply(int delegate(ref JSONType) dg)

Convenience function for iteration that apply to both AA and array type operations with ref value

opIn_r
JSONType* opIn_r(string key)

Allow "in" operator to work as expected for object types without an explicit cast

Meta