Emacs mode to edit JSON

后端 未结 12 1875
面向向阳花
面向向阳花 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 13:04

    json.el by Edward O'Connor is part of GNU Emacs since 23.1 (2008).

    While it isn't a syntax highlighter, it has a useful function to format JSON:

    M-x json-pretty-print-buffer RET
    

    So, if you have a recent version of Emacs, there is no need for jq or python -m json.tool.

提交回复
热议问题