JSON Formatter for Eclipse

I want to format JSON files in my eclipse to save the file action depending on the number of spaces that I can configure. I tried to use the JSON Editor Plugin, but it gave me a null pointer exception when saving.

Error on saving with Json Editor Plugin Then I tried JSON Tools and it worked, but it used a tab to format the strings. Is there any hack I can do with the plugin bank to tune and change the TAB to 4 spaces? Are the best json formatting for eclipse?

+7
json eclipse formatter
source share
3 answers

Have you tried Json Tools for Eclipse ? This is a handy and easy Eclipse plugin. I checked it right now, and it works as you wish - if there is a TAB in the modified JSON file, they change to 4 spaces.

You can find it in the Marketplace or install it using the update site:

https://bitbucket.org/denmiroch/jsontools/src/default/JsonSite/ 
+5
source share

In Eclipse 4.6 (Neon), the JSON editor is included in the Eclipse IDE for Java EE developers.

+1
source share

Some other extensions adhere to a set of preferences for a common text editor.

If it does not encounter other settings, you can try:

General → Appearance → Editors → Text Editors

[x] Insert spaces for tabs

0
source share

All Articles