Download .zip Download .tar.gz View on GitHub

JSON in color

Before

Use pre tag
{
	"allService": {
		"pre": {
			"product_identification": true,
			"product_information": true,
			"authorization_data": true
		},
		"base64": {
			"authorization_data": true,
			"product_identification": true,
			"product_information": true
		},
		"array" : [1,2,3,4,5]
	},
	"product": {
		"name": {
			"product_guid": "GUID",
			"product_configuration": "Configuration",
			"product_identification": "Identification",
			"product_information": "Information",
			"product_status": "Status"
		}
	}
}
			

After

Use pre tag

		
Use div tag
{ "allService": { "pre": { "product_identification": true, "product_information": true, "authorization_data": true }, "base64": { "authorization_data": true, "product_identification": true, "product_information": true }, "array" : [1,2,3,4,5] }, "product": { "name": { "product_guid": "GUID", "product_configuration": "Configuration", "product_identification": "Identification", "product_information": "Information", "product_status": "Status" } } }
Use div tag

Add the following to your code

To end <body>...
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/json-in-color.js"></script>
<script>
var cleanObject = {"allService": {"pre": {"product_identification": true, "product_information": true, "authorization_data": true},
"base64": {"authorization_data": true, "product_identification": true, "product_information": true}, "array" : [1,2,3,4,5]},
"product": {"name": {"product_guid": "GUID", "product_configuration": "Configuration", "product_identification": "Identification",
"product_information": "Information", "product_status": "Status"} } };

$('<pre/>').html(JSON.stringify(cleanObject, null, 3).jsonColor());
</script>