Assuming you’ve got Syntastic installed and operating…
Edit your
vimrc
so vim recognises JSON files.~/.vimrc autocmd BufNewFile,BufReadPost *.json set filetype=json
Install the JSON linter:
npm install -g jsonlint
There’s no step three.
Actually, I wasn’t completely honest about step three. Setting filetype=json
killed syntax highlighting for JSON files for me, so I installed elzr/vim-json. (Previously JSON was being detected and highlighted as Javascript – possibly via pangloss/vim-javascript; a “stock” vim on a different machine managed to detect and highlight JSON out-of-the-box.)