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.json_value.type
- multiple declarations
- Function JSONValue.type
- Function JSONValue.type
Function JSONValue.type
Returns the JSON_TYPE
of the value stored in this structure.
Prototype
JSON_TYPE type() pure nothrow @property @nogc @safe const;
Example
string s = "{ \"language\": \"D\" }"; JSONValue j = parseJSON(s); assert(j.type == JSON_TYPE.OBJECT); assert(j["language"].type == JSON_TYPE.STRING);
Function JSONValue.type
Deprecated. Instead, please assign the value with the adequate
type
to
directly. This will be removed in
June 2015.
JSONValue
Sets the type of this
. Previous content is cleared.
JSONValue
Prototype
deprecated JSON_TYPE type( JSON_TYPE newType ) @property;
Authors
Jeremie Pelletier, David Herberth