Json.toPrettyString

Returns the JSON object as a "pretty" string.

auto json = Json(["foo": Json("bar")]);
writeln(json.toPrettyString());

// output:
// {
//     "foo": "bar"
// }
struct Json
const
string
toPrettyString
(
int level = 0
)

Parameters

level int

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

See Also

writePrettyJsonString, toString

Meta