Browsers have built-in pretty printing for JSON

Posted . Visible to the public.

This pretty-prints a JSON object, with two spaces of indentation:

JSON.stringify(object, null, 2)
Henning Koch
Last edit
Henning Koch
License
Source code in this card is licensed under the MIT License.
Posted by Henning Koch to makandra dev (2016-08-24 09:50)