So why should we bother about having an offline JSON validator or parser? I would like to point out a couple of things, though these mostly depend on personal use cases or choice. We are using online websites & submitting our document to some form where it is getting parsed. As I mentioned, mostly this parsing is done in client side. But do we really check & verify whether the website is making a network call & posting the document to their server? We need to be careful about that when we need to parse sensitive data something that belongs to real user. Otherwise some website can store the sensitive data & get access to it. I am not saying all of them do that, but you never know unless you verify. It’s better if you can do it offline without needing any network. Another thing is your browser does hang if you try to parse large JSON document maybe in 10s of megabytes. Generally we don’t have such a large JSON file. But time to time you may encounter this problem. That’s when you need a robust software which can do the job & doesn’t hang any other apps.
I mostly work in Windows & use NotePad++ to quickly note things down or to read documents. Notepad++ software works well in handling big text documents. It doesn’t hang while opening or scrolling large documents. Notepad++ has a pretty useful plugin which can be installed to parse & validate JSON documents. Once installed, you can validate & view the JSON in tree structure without any internet. It works well with large JSON documents which might be in 10s of megabytes. Also you can select JSON fragment from a mixed document & only format that. You can enter “Ctrl+Alt+Shift+J” after selecting the text or go to plugins > JSON Viewer > show JSON Viewer option.
If text is not a valid JSON, you will get error.
Overall it is a pretty good tool which I have used. You might find it handy.
2 thoughts on “Use Notepad++ As Offline JSON Validator”
But this doesn’t validate versus a JSON schema does it?
It validates whether the text is in proper JSON format. But it doesn’t validate against a specific schema. I don’t think other websites that I mentioned has this feature either.