jsonpretty - JSON prettification script
$ jsonpretty <file.json $ jsonpretty file.json
The jsonpretty script reads the JSON file given on STDIN or as its first argument, decodes it (allowing errors such as shell style comments and extra trailing commas on lists), then pretty prints it.
The pretty printed form is indented and has hash keys sorted and as such is suitable for diffing.
This program always works in utf8. If your JSON is not valid utf8, please ask the nearest internationalisation expert to kill you with a big hammer.
Matt S. Trout <firstname.lastname@example.org>
None required yet. Maybe this code is perfect (hahahahaha ...).
This library is free software and may be distributed under the same terms as perl itself.