If you have ever had a need to read a raw JSON string, you probably noticed that it aint that much human-readable…
What is JSON painter?
This simple jQuery plugin will reformat and colorize any valid JSON, and you eyes will be forever gratefull for it
Here are the highlighs:
- Formats the JSON
- Syntax highlight
- Open / close individual object whitin
- One js file (3.1Kb) + one line of code
- Handles both JSON strings and objects
- Customize the style via CSS to fit your needs
See it in action
I beleive that there is no need to describe this plugin in more details, but if you are intrigued – here is a online demo with code snippets.
The How to guide
Download the script and place wherever you place the java scripts.
Include the jQuery and the JSON painter script in the
Note that if you already have jQuery plugin included, you do not need to include it twice.
Create an element in the document that will hold the painted JSON
If you are familiar with CSS, you can easily define your own styles.
Simply customize the snipper below add it to the
orginal product link