Miscellaneous tools for working with JSON in Notepad++. Includes a general-purpose tree view with powerful search capabilities.
If you have any issues, see if updating to the latest release helps, and then feel free to raise an issue on GitHub. Please be sure to include diagnostic information about your system, Notepad++ version, and plugin version (go to ?->Debug Info...
from the Notepad++ main menu).
Go to the Releases page to see past releases.
Download latest 32-bit version
You can unzip the 32-bit download to .\Program Files (x86)\Notepad++\plugins\JsonTools\JsonTools.dll
.
Download latest 64-bit version
You can unzip the 64-bit download to C:\Program Files\Notepad++\plugins\JsonTools\JsonTools.dll
.
Alternatively, you can follow these installation instructions to install the latest version of the plugin from Notepad++.
You can also download recently committed but unreleased versions of JsonTools by downloading the appropriate GitHub artifact in the following way:
4/4
next to their commit message. Click on it.Details
links. Here's an example of a page that this leads to..Summary
link near the top-left corner of the page. Here's an example of the page this leads to.plugin_dll_x64
(a zip archive containing 64-bit JsonTools.dll
) or plugin_dll_x86
(a zip archive containing 32-bit JsonTools.dll
). Download the appropriate binary for your current Notepad++ installation.JsonTools.dll
inside the extracted folder into the Notepad++\plugins\JsonTools
folder under your Notepad++ installation, overwriting your old version of JsonTools (or rename the old version so that you can switch back to it)If you also want to download the most recent translation to another language, you will need to also download the most up-to-date translation file for that language from the translation
folder of this repo. To do that:
{yourLanguage}.json5
file into the translation
folder of your JsonTools plugin directory, as discussed in the documentation on translating JsonTools.Every version of the plugin works on Notepad++ 8.4.1 onward, although some versions of Notepad++ have problems.
Versions of the plugin from 4.10.0.3 onward are compatible with older Notepad++ (tested for 7.3.3, may be compatible with even older).
Every version up to and including 3.7.2.1 should work natively on Windows 8 or later (note: this is untested), or you must install .NET Framework 4.0. Every version beginning with 4.0.0 works on Windows 10 May 2019 update or later, or you must install .NET Framework 4.8.
This is not a complete list of known issues with JsonTools. For that, see the issue tracker and the Changelog. This is a list of issues that emerged in recent versions of Notepad++.
Enable Copy/Cut Line without selection
is turned off.This plugin may consume huge amounts of memory when working with really huge JSON files (say 50+ megabytes). As of version 0.3.0
, my HugeFiles plugin can break a JSON file up into chunks such that every chunk is syntactically valid JSON. This way you don't need to read the entire file into the text editor, and you can look at one chunk at a time. You can also use this plugin to perform simple find/replace operations on the entire file (maybe eventually allowing control over which sections of the file to edit). Finally, the plugin allows a very large JSON file to be broken up into separate syntactically valid JSON files, which may be easier to use.
JSMinNPP is a reasonable alternative, although as of v5.0.0
, JsonTools has comparable performance and parsing ability.
While not a JSON plugin per se, PythonScript enables Notepad++ users to customize the editor with Python scripts. Since Python has an excellent native JSON library, you could easily use this plugin to create custom scripts for working with JSON.
Because Python has good 3rd-party packages for working with YAML and TOML (two good alternatives to JSON), PythonScript could potentially be used to allow this package to work with YAML and TOML.
Visual Studio Code has native support for JSON with comments. Just go down to where the language is listed in the right side of the taskbar, and select JSON with Comments
from the drop-down menu that appears at the top of the screen.
VSCode also has a built-in JSON tree viewer and some support for searching for keys and indices in JSON.
VSCode has many useful tools for working with JSON Schema. VSCode's JSON Schema validation is much more robust than what this plugin currently offers. You can also configure the editor to automatically use a certain JSON schema to validate JSON with a certain file path. For example, you could configure the editor to always parse files with names like *tweet*.json
with the schema tweet_schema.json
. Note: as of version 4.11, a similar feature exists in this plugin.
The JSON Tools plugin provides the same pretty-print and minify functionalities as this plugin.
Finally, the Encode/Decode plugin allows fast interconversion of YAML and JSON, among other things.
Consult this list. One Emacs plugin, JSON mode, inspired the Path to current line
feature of this plugin.
Python's standard library JSON module is excellent, albeit limited to syntactically correct JSON according to the original JSON standard.
Python's package ecosystem is incredibly rich, so I can't possibly list all the useful tools here. Three that I've enjoyed working with are:
{"a": [1, 2, {"b": [3, 4]}]}
and
{"a": [1, 2, {"b": [4, 4]}]}
differ in that the first element of root['a'][2]['b']
was changed from 3 to 4.
This website offers (limited) JSON->CSV conversion, pretty-printing (appears to use the same algorithm as me), minifying, JSON->XML conversion, and a pretty good tree viewer.
I expect you could find plenty of other good websites if you did some research.
If you are interested in helping users of JsonTools who don't speak English, JsonTools can be translated to other languages beginning in v8.0.
JsonTools infers your preferred language and attempts to translate in the following way:
nativeLang.xml
config file (at XPath path /NotepadPlus/Native-Langue/@name
) to determine what language you prefer to use, and sets lowerEnglishName
to the appropriate value. For example, if this file says galician
, we will attempt to translate JsonTools to galician
.lowerEnglishName
is english
, it does nothing (because JsonTools is naturally in English)translation
subdirectory of the JsonTools
plugin folder (where JsonTools.dll
lives) for a file named {lowerEnglishName}.json5
translation\{lowerEnglishName}.json5
, it attempts to parse the file. If parsing fails, a message box will appear warning the user of this.
JsonTools only attempts to find translation files once, when Notepad++ is starting up. If you change the UI language of Notepad++, you will have to close Notepad++ and reopen it before this change will apply to JsonTools.
To be clear, JsonTools may not be in the same language of the Notepad++ UI. The steps described above represent my best effort to automatically translate JsonTools into a language that the user will find useful, without requiring the user to select their language from a list of available languages in the settings form.
To translate JsonTools to another language, just look at english.json5
in the translations directory of this repo and follow the instructions in that file.
Currently JsonTools has been translated into the following languages: | Language | First version with translation | Translator(s) | Translator is native speaker? |
---|---|---|---|---|
Italian | v8.0 | conky77, molsonkiko (only for messageBoxes and fileComments sections) |
Only conky77 |
The following aspects of JsonTools can be translated:
forms
field of the translation json5
file)menuItems
field)JsonTools.ini
config file (see the settingsDescriptions
field)settingsDescriptions
)jsonLint
field)messageBoxes
field)The following aspects of JsonTools may eventually be translated:
JsonTools sorts strings more or less the same way as other Windows applications like Microsoft Word, while Notepad++ sorts strings based on Unicode code points. This is more intuitive in some cases, and less intuitive in others.
The list below shows which things in JsonTools are case-sensitive and which are case-insensitive.
Case-sensitive sorters:
sorted
and sort_by
RemesPath functionsSort method
= Default
.Case-insensitive sorters:
sort_keys
global setting is true
sort_keys
argument to the stringify
RemesPath function is true
Sort method
= As strings (ignoring case)
Consider this input: ["1","-2","3","o","P","ö","p"]
JsonTools case-sensitive order:
["1","-2","3","o","ö","p","P"]
JsonTools case-insensitive order:
["1","-2","3","o","ö","P","p"]
(the order of the P
and the p
is unstable)
Notepad++ case-sensitive order:
["-2","1","3","P","o","p","ö"]
Notepad++ case-insensitive order:
["-2","1","3","o","P","p","ö"]
(the order of the P
and the p
is unstable)
A summary of some major differences between Notepad++ and JsonTools in string sorting:
ö
between o
and p
(because culturally that makes sense), but Notepad++ puts ö
last, because it compares the strings by Unicode code points, and non-ASCII characters like ö
come after all ASCII characters.P
comes after o
whether case-sensitive or not), but Notepad++ puts all upper-case letters before all lower-case letters when in case-sensitive mode.There are many, many rules for string comparison (and I know very few of them), and I cannot possibly cover them all here. But hopefully this warning will help you not get caught off guard.