goog.format.JsonPrettyPrinter
Provided By |
---|
Formats a JSON object as a string, properly indented for display. Supports displaying the string as text or html. Users can also specify their own set of delimiters for different environments. For example, the JSON object:
{"a": 1, "b": {"c": null, "d": true, "e": [1, 2]}}
Will be displayed like this:
{
"a": 1,
"b": {
"c": null,
"d": true,
"e": [
1,
2
]
}
}
new JsonPrettyPrinter( opt_delimiters )
Parameters |
|
---|