The OpenD Programming Language

toJSON

Takes a tree of JSON values and returns the serialized string.

Any Object types will be serialized in a key-sorted order.

If pretty is false no whitespaces are generated. If pretty is true serialized string is formatted to be human-readable. Set the JSONOptions.specialFloatLiterals flag is set in options to encode NaN/Infinity as strings.

  1. string toJSON(JSONValue root, bool pretty, JSONOptions options)
    @safe
    string
    toJSON
    (
    const ref JSONValue root
    ,
    in bool pretty = false
    ,)
  2. void toJSON(Out json, JSONValue root, bool pretty, JSONOptions options)

Meta