1string json_encode ( mixed $value [, int $options = 0 [, int $depth = 512 ]] ) 2//*arrays are returned only if you don't define index. 3 4 5mixed json_decode ( string $json [, bool $assoc = false [, int $depth = 512 [, int $options = 0 ]]] ) 6//*这个函数仅能处理 UTF-8 编码的数据。 7//*当assoc参数为 TRUE 时,将返回 array 而非 object 。 8//*Any subsequent key named "_empty_" (or "" [the empty string] again) will overwrite the value. 9//*where /\ is the string which doesn't worked. 10 11string json_last_error_msg ( void ) 12/* 13JSON_ERROR_NONE => 'No error', 14JSON_ERROR_DEPTH => 'Maximum stack depth exceeded', 15JSON_ERROR_STATE_MISMATCH => 'State mismatch (invalid or malformed JSON)', 16JSON_ERROR_CTRL_CHAR => 'Control character error, possibly incorrectly encoded', 17JSON_ERROR_SYNTAX => 'Syntax error', 18JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded' 19*/ 20 21int json_last_error ( void ) 22/* 230 = JSON_ERROR_NONE 没有错误发生 241 = JSON_ERROR_DEPTH 到达了最大堆栈深度 252 = JSON_ERROR_STATE_MISMATCH 无效或异常的 JSON 263 = JSON_ERROR_CTRL_CHAR 控制字符错误,可能是编码不对 274 = JSON_ERROR_SYNTAX 语法错误 285 = JSON_ERROR_UTF8 异常的 UTF-8 字符,也许是因为不正确的编码。 29*/
JSON函数
Wesley13
2021-10-11
1004 0 0
点赞
收藏
评论区
加载中...