Re:JSONLint, The JSON Validator
by atuladhar on Sunday February 26, 2012 @02:55PM
(#3636566)
Also worth mentioning is the pure JavaScript implementation at http://zaach.github.com/jsonlint/ for people worried about sending data to the jsonlint.com server.
Re:JSONLint, The JSON Validator
by Xion on Sunday February 26, 2012 @03:31PM
(#3636695)
A casual inspection of Firebug shows that the only way JSONLint communicates with outside world when you click Validate is to report usage to Google Analytics. It certainly doesn't appear to be sending the actual JSON anywhere.
Re:JSONLint, The JSON Validator
by bstar77 on Sunday February 26, 2012 @02:59PM
(#3636583)
If anyone wants to validate on the client side(mac) and also have a great UI for editing/creating json strings, I highly recommend:
http://olivierlabs.com/jason/index.html
I find that I use this tool constantly to build mocks for prototypeing and testing my various JS projects.
Re:JSONLint, The JSON Validator
by thezilch on Sunday February 26, 2012 @06:00PM
(#3637090)
Quick python validator, for those that would rather stay on the CLI and/or not have to copy/paste/submit to an external service: https://gist.github.com/1919460
Re:JSONLint, The JSON Validator
by hp on Sunday February 26, 2012 @10:35PM
(#3637671)
it seems to allow duplicate keys but drops all but one. I have no idea if this is correct since the JSON spec doesn't really cover it. personally I think the spec should ban it because it means you need to parse the closing brace for an object before you know you have the right value for any field. also it means you need to keep a dictionary-like representation in memory to detect the dups, a list or stream of pairs wouldn't consolidate dups.
a nitpick for sure but several times I've wished the JSON spec had something to say here.
Fun fact: jsonlint uses an html5 cache manifest, and can be used even while offline.
I find that I use this tool constantly to build mocks for prototypeing and testing my various JS projects.
http://json-schema-tester.herokuapp.com/
a nitpick for sure but several times I've wished the JSON spec had something to say here.