Hacker News new | past | comments | ask | show | jobs | submit login

You can do the same in the browser console. I don't really get why people need an online tool for this:

   copy(JSON.stringify(obj, null, 2))
obj can be parsed with JSON.parse if it is in text.



Even better, just open the JSON file in Firefox.


Not bad. I usually copy json data from the browser console, but for files this can be useful.


> I don't really get why people need an online tool for this:

That’s rather condescending, and probably not true. Surely you must be able to think of reasons why someone would use a website instead of writing a one-line program.


The only reason I can think of is if this is something which one very rarely needs. Otherwise, I'd think those who regularly handle JSON files are able to write a one line program.

And the JS console was only an example. Other languages can also pretty print JSON trivially. E.g. python.


On chrome at least copy(Paste json here) is enough




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

Search: