JSON (JavaScript Object Notation) is a subset of JavaScript useful as a format for transferring data from program to program, much like XML.

Read all about it at [http://json.org/ json.org]!

You can decode and encode JSON from Emacs Lisp using [http://edward.oconnor.cx/2006/03/json.el json.el].  It is part of GNU Emacs since 23.1 (2008).

==json-mode==
Some highlighting support for editing json files is provided by [https://github.com/joshwnj/json-mode json-mode].

If you have python or jsonlint installed, Flycheck can report errors in json-mode, just do:

  (add-hook 'json-mode-hook #'flycheck-mode)

([https://github.com/zaach/jsonlint jsonlint] can give schema-based validation, but the python-based validator is handy too for simply catching missing commas etc.)

==formatting by hand==
https://github.com/gongo/json-reformat mentions that Emacs 24.4+ has built-in <code>json-pretty-print</code> and <code>json-pretty-print-buffer</code> functions.

As https://irreal.org/blog/?p=354 wrote, you can also simply

   C-u M-| python -m json.tool

to reformat a buffer containing JSON.
----
CategoryData
CategoryExtensions
CategoryJavaScript
