Editing JSON files with ColdFusion Builder
Communication between applications or services have become more common in today’s applications, and one very popular open-standard file format is JSON (Java Script Object Notation). This is a human-readable data interchange text that represents complex data or objects formed by attribute-value pairs.
Sometimes you will need to create or edit a .json file in your IDE and the more complex the object, the more difficult is to read it if it is not properly formatted, to assist you in this task there is an eclipse plugin that “beautifies” the text and creates collapsible nodes to make your life easier when dealing with json files. ColdFusion Builder works on top of Eclipse so you can install it with no issues.
Installing the plugin
- In ColdFusion Builder go to the top menu Help -> Install New Software…
- Press the “Add…” button on the top right and in the “Add Repository” window type a Name to identify the plugin, in Location type http://boothen.github.io/Json-Eclipse-Plugin/ and click “OK”.
- Check all the dependencies showed (ANTLR4, JSON Editor) in the window and click “Next”
- Click to select the JSON Editor Plugin and press “Next”
- Accept the terms of the license agreement and click “Finish”
- You will see a Security warning but don’t worry this is a safe operation, just click “OK” and after the installation is finished restart ColdFusion Builder.
Once ColdFusion Builder has been restarted, the JSON files in your Navigator panel will appear with the correspondent icon . If that is not the case, to make sure the this type of files are related with the plugin in your editor, right click on the file name in the navigator and select “Open With” => “JSON Editor”
Now when you open a JSON file the plugin will provide you with some new features:
- Handlers to collapse/expand nodes of your object, this is very helpful when handling large files.
- “Beautify” your file, this function formats your object giving proper indentation to parents and children nodes, there are two options:
- Right click on any part of the working area and select the Format JSON option
- Press this key combination CTRL + SHIFT + F
- Outline view.
In this panel you will see all the tree structure of your object so you can explore it with ease.
I hope this help you enhance your tool arsenal and be more productive.
If you want more information about the plugin, Click here