Function writeJSON

Writes the string representation of the given JSON document(s)/tokens to an output range.

void writeJSON(GeneratorOptions options = GeneratorOptions.init, Output) (
  JSONValue value,
  ref Output output
)
if (isOutputRange!(Output, char));

void writeJSON(GeneratorOptions options = GeneratorOptions.init, Output, Input) (
  Input nodes,
  ref Output output
)
if (isOutputRange!(Output, char) && isJSONParserNodeInputRange!Input);

void writeJSON(GeneratorOptions options = GeneratorOptions.init, Output, Input) (
  Input tokens,
  ref Output output
)
if (isOutputRange!(Output, char) && isJSONTokenInputRange!Input);

void writeJSON(GeneratorOptions options = GeneratorOptions.init, String, Output) (
  in ref JSONToken!String token,
  ref Output output
)
if (isOutputRange!(Output, char));

See toJSON for more information.

Parameters

NameDescription
output The output range to take the result string in UTF-8 encoding.
value A single JSON document
nodes A set of JSON documents encoded as single parser nodes. The nodes must be in valid document order, or the parser result will be undefined.
tokens List of JSON tokens to be converted to strings. The tokens may occur in any order and are simply appended in order to the final string.
token A single token to convert to a string

See also

toJSON, writePrettyJSON