How to use 'lintjson' in JavaScript

Every line of 'lintjson' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
717function checkJSON(obj) {
718 if (!obj) {
719 return true;
720 }
721 try {
722 JSON.stringify(obj);
723 } catch (e) {
724 return false;
725 }
726 return true;
727}

Related snippets