Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
Not a plugin for Notepad++ but XML ValidatorBuddy is also a JSON editor and comes with a built-in JSON syntax checker and auto-completion. It is a standalone Windows tool. –  Clemens Oct 23 '12 at 9:38

1 Answer 1

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.

share|improve this answer
    
+1 for JSON Viewer- I use it all the time. can also format/reindent your JSON string. Only thing is you have to manually use the functionality- I don't think you can do it every time a .json file is opened –  Robotnik Jul 9 '12 at 0:16
    
Thanks, I upvoted, but it's still not quite what I hoped for; JSMin ignores errors, and JSON Viewer while it does fail if the json is not properly formatted, I still get much more if I parse it using JSONView in Google Chrome since as opposed to JSON Viewer it tells exactly what is missing and where. Oh well. I suppose I can only hope someday somebody able to code npp plugins comes across this and implements a simple one-button solution to parse and validate json. –  Mahn Jul 9 '12 at 16:26
    
@Mahn: Thanks. Necessity is the mother of invention, so perhaps you should be that someone... –  martineau Jul 9 '12 at 16:54
    
I'd love to, but I'm involved in a somewhat big project atm and time is ticking out :) maybe someday. –  Mahn Jul 9 '12 at 19:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.