Monday, June 30th, 2008
JSON Diff Released
Tom Robinson has built a useful utility, JSON Diff, which gives you a graphical look at the difference.
Changed portions are displayed in yellow. Additions are displayed in green. Deletions are displayed in red.
The visualization is live itself, so you can move around the nodes using the triangles.













Not sure why it restricts itself to just JSON, but very handy! Thanks.
FF2
too much recursion
typeofReal(”v”)jsondiff (line 127)
compareTree(”v”, null, “0″, li)jsondiff (line 53)
compareTree(”v”, null, “0″, li)jsondiff (line 113)
compareTree(”v”, null, “0″, li)jsondiff (line 113)
compareTree(”v”, null, “0″, li)
I like the idea, but what is it practically good for?
keitha: Yeah its recursive so it will die on really deep JSON structures. Was the JSON you tried really big? I could rewrite it to not be recursive, but I don’t think most people will run into the limit.
AndreasBarthazi: I wrote it because I was sick of manually looking through strings of JSON for the differences. I needed it, I thought others might too.
I made a JSON diff algorithm some time back. I argue for its uses in the short article I wrote about it.
My diff algorithm even handles cyclic references in the JSON objects (deep objects).
See http://michael.hinnerup.net/blog/2008/01/15/diffing_json_objects/