PHP_判斷json物件
Â
function isJson($string) {
json_decode($string);
return json_last_error() === JSON_ERROR_NONE;
}
Â
Â
function isJson($string) {
json_decode($string);
return json_last_error() === JSON_ERROR_NONE;
}
Â