Hacker News new | past | comments | ask | show | jobs | submit login
JSONLint, The JSON Validator (jsonlint.com)
55 points by tilt on Feb 26, 2012 | hide | past | favorite | 17 comments



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.


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.


This is correct, I'm the creator of jsonlint. It actually uses zaach's implementation of jsonlint in JS, now.

Fun fact: jsonlint uses an html5 cache manifest, and can be used even while offline.


Thanks; that's good to know. Thank you also for jsonlint.com; great tool.


Google Analytics is just as irritating.


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.


I wrote a quick Python version for use on the command line: https://gist.github.com/1653544


python -m json.tool /path/to/file.json


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


Another JSON tool that is less well known but also extremely useful is the JSON schema validator tool at:

http://json-schema-tester.herokuapp.com/


I know its a fundamental part of web browsing but the inability to use tabs in a text area such as this gets to me.


http://alanhogan.com/code/tabs-in-textareas I link to a bookmarklet here that should help. (You can hit Esc to break out of the textarea, I believe)


Wow thank you. This is very very useful. This has plagued me in a number of websites recently.


Have been using this for a while now as a quick way to get data a bit readable. Works pretty well.


Check out apigee.com if you want something more refined.


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.


This is a nice litte webapp, I have been using it for a couple of months now, and it has been very useful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: