View source code
Display the source code in std/json.d from which this
page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a
Bugzilla issue.
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.
std.json.parseJSON
- multiple declarations
Function parseJSON
Parses a serialized string and returns a tree of JSON values.
JSONValue parseJSON(T)
(
T json,
int maxDepth = -1,
JSONOptions options = JSONOptions .none
)
if (isInputRange!T && !isInfinite!T && isSomeChar!(ElementEncodingType!T));
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
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.
JSONValue parseJSON(T)
(
T json,
JSONOptions options
)
if (isInputRange!T && !isInfinite!T && isSomeChar!(ElementEncodingType!T));
Throws
JSONException
if the depth exceeds the max depth.
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
License
Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.