search

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
opt_delimiters(goog.format.JsonPrettyPrinter.TextDelimiters|null)=

Container for the various strings to use to delimit objects, arrays, newlines, and other pieces of the output.

Instance Methods

Classes