24

I'm looking for a plugin that can check the current opened file and instantly tell me whether it is valid JSON or not (eg whether there's a comma or a bracket missing) — is there any? I'm currently using JSONView on Chrome but it's a pain to always go check the file in the browser and back.

I'm often writing data in json by hand, hence why I feel this could save me a lot of time.

Mahn
  • 882

2 Answers2

10

You might be able to use a JSON formatter to accomplish the task (since it would likely complain or do something wrong -- say, like indent improperly -- if the JSON's invalid). See Is there an extension to reindent JSON in Notepad++?. Similarly, there's a JSONViewer Notepad++ plugin the might help in the same way.

Another less-than-ideal alternative would be to just use one of the online JSON validators.

martineau
  • 4,573
4

There is plugin for NPP+ called JSLint. It is a plugin to validate JavaScript-code, but it works also just fine with JSON-files.

techraf
  • 4,952
Michael
  • 41