Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if the data can be parsed javascript

function isJson(str) {
            try {
                return JSON.parse(str);
            } catch (e) {
                return false;
            }
        }
 
PREVIOUS NEXT
Tagged: #check #data #parsed #javascript
ADD COMMENT
Topic
Name
9+2 =