Answers for "how to check if json has error in php"

PHP
2

php check if json

function isJson($string) {
 json_decode($string);
 return (json_last_error() == JSON_ERROR_NONE);
}
Posted by: Guest on April-09-2020
0

php check valid json string

@json_decode($page_str);
$json_OK=	json_last_error() == JSON_ERROR_NONE;
Posted by: Guest on January-12-2021

Code answers related to "how to check if json has error in php"

Browse Popular Code Answers by Language