3 ms·
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 parse
by dmortin 7y ago
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.
- steve_taylor 7y agoEven better, just open the JSON file in Firefox.
- dmortin 7y agoNot bad. I usually copy json data from the browser console, but for files this can be useful.
- tobr 7y ago> 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.
- dmortin 7y agoThe 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.
- beothorn 7y agoOn chrome at least copy(Paste json here) is enough