8

I've been using JSONLint online which has been really helpful. I NEED to get this into Node.js though.

Our QA and even I put in so much invalid JSON it's not even funny. The server is using the connect bodyDecoder from connect which currently barfs on invalid input (not sure why the stock bodyDecoder doesn't even catch the error, but oh well). I'll probably want to make my own bodyDecoder, but I can only find a C based JSONLinter.

Is there any library I can use in Node.js to throw helpful errors (such as on http://www.jsonlint.com/) instead of crazy "string not expected" vague errors?

1 Answer 1

10

Pure javascript implementation: https://github.com/zaach/jsonlint, common js compatible to boot.

Sign up to request clarification or add additional context in comments.

1 Comment

@V_H I've been using DuckDuckGo lately to find stuff on Github; make sure you use that keyword first: duckduckgo.com/?q=github+json+lint+javascript

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.