Emacs mode to edit JSON

后端 未结 12 1758
面向向阳花
面向向阳花 2021-01-30 12:15

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

12条回答
  •  长发绾君心
    2021-01-30 12:59

    If you want something lightweight try this major-mode I hacked together: https://github.com/joshwnj/json-mode

    It's actually no more than some extra syntax highlighting on top of javascript-mode, but for my purposes I've found it to work quite well.

    Another common use-case is auto-formatting a JSON file (eg. if it's whitespace-compressed and you want more readability). To do this I'm just piping the buffer through a command-line script: C-u M-|

提交回复
热议问题