vibe.d beta banner
get vibe.d
0.7.30

Function Json.toString

Returns the JSON object as a string.

string toString () @trusted const;

void toString (
  scope @safe void delegate(const(char)[]) sink,
  std.format.FormatSpec!(char) fmt
) @trusted;

void toString (
  scope void delegate(const(char)[]) sink,
  std.format.FormatSpec!(char) fmt
);

For large JSON values use writeJsonString instead as this function will store the whole string in memory, whereas writeJsonString writes it out bit for bit.

See Also

writeJsonString, toPrettyString

Authors

Sönke Ludwig

Copyright

© 2012-2015 RejectedSoftware e.K.

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.