Using this IntelliJ plugin, you can:
- Prettify your JSON string and view colored format
- Highlight bracket pairs as you move through lines
- Scroll through matching bracket line
- Copy formatted JSON string seen on the text pane entirely or partially
- Replace selected JSON string with the prettified version
-
There are two use cases where View as JSON button will be visible:
- Select your text and right click on it
- You need to select a valid JSON string, otherwise you will see an error message
- Right click on the file with json extension
- You need to select a JSON file that contains a valid JSON string, otherwise you will see an error message
- Select your text and right click on it
-
Click View as JSON
- Click Copy all button if you want to copy the entire text
- Click Copy interval button if you want to copy the lines between matching brackets
- Click Replace selected button if you want to replace the selected JSON string with the prettified version
-
Enjoy!
- Use arrow keys or mouse clicks to move through lines
- Use Space to scroll through matching bracket line if there is any
-
Using IDE built-in plugin system:
Settings/Preferences > Plugins > Marketplace > Search for "View as JSON" > Install Plugin
-
Manually:
Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
- Rob Camick's LinePainter code is adapted to implement line highlighting feature