Is it possible to validate JSON file using JSON schema in Emacs with flymake/flycheck? What would be the best validator to detect schema-related error and notify it to Emacs with appropriate error message and location?
Asked
Active
Viewed 2,797 times
6
-
Flycheck does not include a syntax checker for schema-based JSON validation. You need to write your own… – Oct 15 '13 at 22:03
-
Maybe https://github.com/zaach/jsonlint or do you need more elaborate schema options? – Knut Forkalsrud Mar 20 '15 at 03:34
2 Answers
2
Theres is flymake-json, which uses jsonlint. It can be installed with package-install
.

arvidj
- 775
- 5
- 25
1
Flycheck has support for JSON: https://www.flycheck.org/en/latest/languages.html#json
Also lsp-mode can be used with either flymake or flycheck: https://emacs-lsp.github.io/lsp-mode/page/lsp-json/

albert200000
- 335
- 3
- 13