parseJSON

fnJSONValue parseJSON(T)(T json, int maxDepth = - 1, JSONOptions options = JSONOptions.none) if (isSomeFiniteCharInputRange!T)

Parses a serialized string and returns a tree of JSON values.

Throws

JSONException if string does not follow the JSON grammar or the depth exceeds the max depth, ConvException if a number in the input cannot be represented by a native D type.

Parameters

jsonjson-formatted string to parse
maxDepthmaximum depth of nesting allowed, -1 disables depth checking
optionsenable decoding string representations of NaN/Inf as float values
fnJSONValue parseJSON(T)(T json, JSONOptions options) if (isSomeFiniteCharInputRange!T)

Parses a serialized string and returns a tree of JSON values.

Throws

JSONException if the depth exceeds the max depth.

Parameters

jsonjson-formatted string to parse
optionsenable decoding string representations of NaN/Inf as float values