JSON files (text files that contain a JSONobject) are not formatted very well with the default formatters in Eclipse. Fortunately, there is a nice plugin that handles standard beautification and indentation for JSON structures. The appropriate links for the solution are below.
- Eclipse Json Editor Plugin - Browse /eclipsejsonedit/Json Editor Plugin 0.9.6 at SourceForge.net - download the zip file for importing.
- The source of this solution: install and use a JSON editor in Eclipse
- Right-click on the *.json file and "Open with..." in Eclipse. This should only be necessary if the file(s) had been opened previously using a different perspective (e.g., as a text file).