In vim, the default indentation for JSON is:
{
\"employees\": [
{ \"firstName\":\"John\" , \"lastName\":\"Doe\" },
{ \"firstName\":\"Anna\" , \"
Easier way is to just external command as a filter for a selection. e.g.
:!python -m json.tool
Add this statement to /etc/vim/vimrc
:
autocmd Filetype json setlocal ts=2 sw=2 expandtab
It will force json presentation with 2 spaces tab, besides defining tab behaviour for such file.