D Programming Language 2.0

- Comments
- D
- Search
- Home

Last update Tue Feb 14 02:46:14 2012

# std.json

JavaScript Object Notation

License:
Boost License 1.0.

Authors:
Jeremie Pelletier

References:
http://json.org/

Source:
std/json.d

enum JSON_TYPE;
  JSON type enumeration

  STRING
  INTEGER
  FLOAT
  OBJECT
  ARRAY
  TRUE
  FALSE
  NULL
    Indicates the type of a JSONValue.

struct JSONValue;
  JSON value node

  string str;
    Value when type is JSON_TYPE.STRING

  long integer;
    Value when type is JSON_TYPE.INTEGER

  real floating;
    Value when type is JSON_TYPE.FLOAT

  JSONValue[string] object;
    Value when type is JSON_TYPE.OBJECT

  JSONValue[] array;
    Value when type is JSON_TYPE.ARRAY

  JSON_TYPE type;
    Specifies the type of the value stored in this structure.

JSONValue parseJSON(T)(T json, int maxDepth = -1);
  Parses a serialized string and returns a tree of JSON values.

string toJSON(in JSONValue* root);
  Takes a tree of JSON values and returns the serialized string.

class JSONException: object.Exception;
  Exception thrown on JSON errors

Copyright Jeremie Pelletier 2008 - 2009. | Page generated by Ddoc.