View source code
Display the source code in std/json.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
std.json.parse_json
- multiple declarations
- Function parseJSON
- Function parseJSON
Function parseJSON
Parses a serialized string and returns a tree of JSON values.
Throws a std.json.JSONException
if the depth exceeds the max depth.
Prototype
JSONValue parseJSON(T)( T json, int maxDepth = -1, JSONOptions options = JSONOptions.none ) if (isInputRange!T);
Parameters
Name | Description |
---|---|
json | json -formatted string to parse |
maxDepth | maximum depth of nesting allowed, -1 disables depth checking |
options | enable decoding string representations of NaN/Inf as float values |
Function parseJSON
Parses a serialized string and returns a tree of JSON values.
Throws a std.json.JSONException
if the depth exceeds the max depth.
Prototype
JSONValue parseJSON(T)( T json, JSONOptions options ) if (isInputRange!T);
Parameters
Name | Description |
---|---|
json | json -formatted string to parse |
options | enable decoding string representations of NaN/Inf as float values |
Authors
Jeremie Pelletier, David Herberth