Major mode for editing JSON files.
Extends the builtin js-mode to add better syntax highlighting for JSON and some nice editing keybindings.
M-x package-install json-mode
You need to have the MELPA repository or MELPA Stable repository enabled in emacs for this to work.
C-c C-f: format the region/buffer withjson-pretty-print(https://git.savannah.gnu.org/cgit/emacs.git/tree/lisp/json.el)C-c C-p: display a path to the object at point withjson-snatcher(https://github.com/Sterlingg/json-snatcher)C-c P: copy a path to the object at point to the kill ring withjson-snatcher(https://github.com/Sterlingg/json-snatcher)C-c C-t: Toggle betweentrueandfalseat pointC-c C-k: Replace the sexp at point withnullC-c C-i: Increment the number at pointC-c C-d: Decrement the number at point
Customize js-indent-level.
In addition to JSON files, this package provides jsonc-mode for editing JSON with commas and comments (sometimes referred to as huJSON or JWCC).
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.