JSON is a popular way to format AJAX responses, as it’s more compact than XML and essentially a JavaScript object, but it can be a real pain to work with due to uncooperative browsers. It’s easy enough to view XML in a web browser, which is good for testing, but JSON responses cause a download prompt to open. This makes it harder to verify that an AJAX request is working properly.

Normally when encountering a JSON document content type "application/json", Firefox simply prompts you to download the file. With the JSONView extension, JSON documents are shown in the browser similar to how XML documents are shown. The document is formatted, highlighted, and arrays and objects can be collapsed. Even if the JSON document contains errors, JSONView will still show the raw text.

 
Once you've got JSONView installed, check out the link below to see ho how JSON data looks like.


JSONview is firefox extension and can be downloaded from there

Firefox: Download Here

1 comments:

Should actually look like this me thinks:


{
"hey": "guy",
"anumber": 243,
"anobject": {
"whoa": "nuts",
"anarray": [1, 2, "thr<h1>ee"],
"more": "stuff"
},
"awesome": true,
"bogus": false,
"meaning": null,
"japanese": "明日がある。",
"link": "http://jsonview.com",
"notLink": "http://jsonview.com is great"
}

Post a Comment