Answers for "check data is json or not php"

PHP
8

php is json string

function IsJsonString(str) {
    try {
        JSON.parse(str);
    } catch (e) {
        return false;
    }
    return true;
}
Posted by: Guest on April-10-2020

Code answers related to "check data is json or not php"

Browse Popular Code Answers by Language