JSON 결과 나오지 않을 때
json_last_error() 확인
https://www.php.net/manual/en/function.json-last-error.php
PHP: json_last_error - Manual
use this code with mb_convert_encoding, you can json_encode some corrupt UTF-8 chars function safe_json_encode($value, $options = 0, $depth = 512) { $encoded = json_encode($value, $options, $depth); if ($encoded === false && $val
www.php.net
json_last_error_msg() 확인
https://www.php.net/manual/en/function.json-last-error-msg.php
PHP: json_last_error_msg - Manual
Here's an updated version of the function: 'No error', JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', JSON_ERROR_STATE_MISMATCH => 'State mismatch (invalid or malformed JSON)', JSON_
www.php.net
php.net 에서 내용을 확인할 수 있다.