Struct JSONValue

JSON value node

struct JSONValue ;

Constructors

NameDescription
this (arg) Constructor for JSONValue. If arg is a JSONValue its value and type will be copied to the new JSONValue. Note that this is a shallow copy: if type is JSONType.object or JSONType.array then only the reference to the data will be copied. Otherwise, arg must be implicitly convertible to one of the following types: typeof(null), string, ulong, long, double, an associative array V[K] for any V and K i.e. a JSON object, any array or bool. The type will be set accordingly.

Fields

NameTypeDescription
objectKeyOrder string[]

Properties

NameTypeDescription
array[get, set] inout(JSONValue[])Value getter/setter for JSONType.array.
arrayNoRef[get] inout(JSONValue[])Value getter for JSONType.array. Unlike array, this retrieves the array by value and can be used in @safe code.
boolean[get, set] boolValue getter/setter for boolean stored in JSON.
floating[get, set] doubleValue getter/setter for JSONType.float_. Note that despite the name, this is a 64-bit double, not a 32-bit float.
get[get] inout(T)Generic type value getter A convenience getter that returns this JSONValue as the specified D type.
get[get] inout(T)
get[get] inout(T)
integer[get, set] longValue getter/setter for JSONType.integer.
isNull[get] boolTest whether the type is JSONType.null_
object[get, set] inout(JSONValue[string])Value getter/setter for JSONType.object.
objectNoRef[get] inout(JSONValue[string])Value getter for JSONType.object. Unlike object, this retrieves the object by value and can be used in @safe code.
str[get, set] stringValue getter/setter for JSONType.string.
type[get] JSONTypeReturns the JSONType of the value stored in this structure.
uinteger[get, set] ulongValue getter/setter for JSONType.uinteger.

Methods

NameDescription
opApply (dg) Implements the foreach opApply interface for json arrays.
opApply (dg) Implements the foreach opApply interface for json objects.
opAssign (arg)
opAssign (arg)
opBinary (arg)
opBinaryRight (k) Support for the in operator.
opEquals (rhs)
opEquals (rhs)
opIndex (i) Array syntax for json arrays.
opIndex (k) Hash syntax for json objects.
opIndexAssign (value, key) Operator sets value for element of JSON object by key.
opIndexAssign (arg, i)
opOpAssign (arg)
toPrettyString (sink, options)
toPrettyString (options) Implicitly calls toJSON on this JSONValue, like toString, but also passes true as pretty argument.
toString (options) Implicitly calls toJSON on this JSONValue.
toString (sink, options)

Unions

NameDescription
Store