Does anybody know a good Emacs mode to edit JSON? An app I am working on uses a JSON based communication protocol and having the data nicely indented and syntax-highlighted woul
Since JSON is a subset of YAML, yaml-mode
works too (I don't know how it compares to js-mode
and json-mode
, though).
Install (from emacs): M-x package-install yaml-mode
.
Association of yaml-mode
with YAML and JSON files, in ~/.emacs.d/init.el
:
(add-to-list 'auto-mode-alist '("\\.yaml$" . yaml-mode))
(add-to-list 'auto-mode-alist '("\\.json$" . yaml-mode))