writeJsonString

Writes the given JSON object as a JSON string into the destination range.

This function will convert the given JSON value to a string without adding any white space between tokens (no newlines, no indentation and no padding). The output size is thus minimized, at the cost of bad human readability.

@safe
void
writeJsonString
(
R
bool pretty = false
)
(
ref R dst
,,
size_t level = 0
)

Parameters

dst R

References the string output range to which the result is written.

json Json

Specifies the JSON value that is to be stringified.

level size_t

Specifies the base amount of indentation for the output. Indentation is always done using tab characters.

See Also

Json.toString, writePrettyJsonString

Meta