Notepad++ is an Editor for source format with the following features
- Indentation format
- Syntax Highlight
Like any editor, Notepad++ by default works as a simple editor, you can configure and install plugins to get features.
For example, JSOn, We have a lot of plugins JSTool - JSOn format and JSON viewer
How to open JSOn FIles in Notepad++?
JSOn content in a file contains strings, so You can use any editor to open and save the files.
Notepad++ is also used to open and read JSON files.
It supports opening and reading larger JSOn files by reading json content into memory, So Notepad++ throws an Out Of Memory Exception If the file is in the size of GB.
How to format json file in Notepad++
In Notepad++, the Following are step-by-step guides to pretty print json in Notepad++
- Click on the
Plugins
Menu and selectPlugins Admin
- In the Search box, Type JSTool and Check JSTool Checkbox, click on Install
- This installs the JSTool plugin in Notepad
- Open JSON file in Notepad++
- Click on the
Plugins
Menu, SelectJSTool
->JSFormat
option or you can choose a shortcut key CTRL+ALT+M command - This formats the JSON content with a pretty print
How do I enable syntax highlighting for JSON in Notepad++?
Syntax Highlight is one of the important features of any Editor to improve user-readable with colors of text.
Notepad++ Provides the option to configure user-defined files with syntax highlights.
By default, JSOn configured with Syntax highlight by default.
You can enable it by selecting theLanguage
Menu -> J -> JSOn and It highlights color syntax for json files for opened files.
You can still configure and change the colors with the below steps.
Go to Settings
-> Style configurator
- Select JSON
language.
With these steps, you can change styles for the below things.
- Foreground and background color
- Change font styles like font size, Bold, Italic, and Underline
- Styles for double and single quote text
- Boolean and number text styles
JSOn validation with Notepad++
Notepad++ has limited support for the validation of JSOn content.
JSON formatter gives an error or warning during the format of an opened json file. You can also check JSON viewer to check for invalid json content.
If these things are not working, you can check online json validators
for the desired thing.