Tuesday, May 29, 2007

BeautifyJson - More then just a JSON pretty printer

Recently i was working with a JSON feed and the feed as all JSON feed was a little obfuscated. I searched for a program to provide a more readable output and found one called Tidy JSON. I downloaded it and tried it on my feed. The program worked just fine but it was not very convenient due to several reasons. The most i hated was the inconvenience i faced when traversing the DOM structure. And then it was platform dependent. In the end i decided to write my own version and since it may be useful to many people decided to publish it.
This program is capable of producing output in HTML and text format. The HTML output is very easy to traverse with the inbuilt javascript feature i added. You can download it here. Everything you need is present in the archive. You will need flex to compile it.
JSON beautified and formatted to html

Output of BeutifyJSON in html format

Click Here to see a live demo of the program's output.
Please report any bug you find and also any feature you want me to add to it.

EDIT: Due to strange rendering bugs in IE the HTML doesn't display properly in it when the JSON input is large. Try using firefox at that time.

2 Comments:

MLModel said...

Nice, and thanks for the platform-independent tool.

What do you mean by "easy to traverse with the inbuilt javascript feature"? All I see is formatted and colorized text -- is anything active in any way? Clickable? (It might be interesting to add collapse/expand to nodes, etc.)

sandeep said...

sorry for the late reply. the notification had been sitting in my mail box and i haven't seen it :( and i am too damn busy working on a software named protege that i dont get time to visit the blog.
Regarding your post. i anticipated it and the nodes are indeed traversable easily and they are clickable.