I want to format the JSON files in my eclipse on save file action, based on number of spaces that i can configure. I tried using JSON Editor Plugin but it gave me null pointer exception on saving.
Then i tried JSON Tools plugin and it worked but it used a tab for formatting the lines. Is there any hack that i can do with plugin jar to configure and change TAB to 4 spaces? Are better json formatter available for eclipse?
Have you tried Json Tools for Eclipse? It is handy and lightweight Eclipse plugin. I have checked this right now and it works as you want - if there are TABs in a modified JSON file, they are changed to 4 spaces.
You can find it in Marketplace or install it using update site:
https://bitbucket.org/denmiroch/jsontools/src/default/JsonSite/