预锟斤拷锟藉常锟斤拷

锟斤拷锟叫筹拷锟斤拷锟缴达拷锟斤拷展锟斤拷锟藉,锟揭斤拷锟节达拷锟斤拷展锟斤拷锟斤拷锟斤拷 PHP 锟斤拷锟斤拷锟斤拷锟斤拷时锟斤拷态锟斤拷锟斤拷时锟斤拷锟矫★拷

锟斤拷锟铰筹拷锟斤拷锟斤拷示锟斤拷 json_last_error() 锟斤拷锟斤拷锟截的达拷锟斤拷锟斤拷锟酵★拷

JSON_ERROR_NONE (integer)
没锟叫达拷锟斤拷锟斤拷锟斤拷锟斤拷 PHP 5.3.0 锟斤拷锟斤拷效锟斤拷
JSON_ERROR_DEPTH (integer)
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷栈锟斤拷取锟斤拷锟� PHP 5.3.0 锟斤拷锟斤拷效锟斤拷
JSON_ERROR_STATE_MISMATCH (integer)
锟斤拷锟斤拷锟斤拷锟斤拷锟界(underflow锟斤拷锟斤拷锟斤拷模式锟斤拷匹锟戒。锟斤拷 PHP 5.3.0 锟斤拷锟斤拷效锟斤拷
JSON_ERROR_CTRL_CHAR (integer)
锟斤拷锟斤拷锟街凤拷锟斤拷锟襟,匡拷锟斤拷锟角憋拷锟诫不锟皆★拷锟斤拷 PHP 5.3.0 锟斤拷锟斤拷效锟斤拷
JSON_ERROR_SYNTAX (integer)
锟斤法锟斤拷锟斤拷 锟斤拷 PHP 5.3.0 锟斤拷锟斤拷效锟斤拷
JSON_ERROR_UTF8 (integer)
锟届常锟斤拷 UTF-8 锟街凤拷锟斤拷也锟斤拷锟斤拷锟斤拷为锟斤拷锟斤拷确锟侥憋拷锟诫。 锟斤拷 PHP 5.3.3 锟斤拷锟斤拷效锟斤拷
JSON_ERROR_RECURSION (integer)
The object or array passed to json_encode() include recursive references and cannot be encoded. If the JSON_PARTIAL_OUTPUT_ON_ERROR option was given, NULL will be encoded in the place of the recursive reference. Available since PHP 5.5.0.
JSON_ERROR_INF_OR_NAN (integer)
The value passed to json_encode() includes either NAN or INF. If the JSON_PARTIAL_OUTPUT_ON_ERROR option was given, 0 will be encoded in the place of these special numbers. Available since PHP 5.5.0.
JSON_ERROR_UNSUPPORTED_TYPE (integer)
A value of an unsupported type was given to json_encode(), such as a resource. If the JSON_PARTIAL_OUTPUT_ON_ERROR option was given, NULL will be encoded in the place of the unsupported value. Available since PHP 5.5.0.
JSON_ERROR_INVALID_PROPERTY_NAME (integer)
A key starting with \u0000 character was in the string passed to json_decode() when decoding a JSON object into a PHP object. Available since PHP 7.0.0.
JSON_ERROR_UTF16 (integer)
Single unpaired UTF-16 surrogate in unicode escape contained in the JSON string passed to json_encode(). Available since PHP 7.0.0.

锟斤拷锟斤拷某锟斤拷锟斤拷锟斤拷院锟� json_decode() 锟斤拷 form 选锟斤拷锟斤拷使锟矫★拷

JSON_BIGINT_AS_STRING (integer)
锟斤拷锟斤拷锟斤拷锟街憋拷锟斤拷锟皆硷拷址锟皆拷锟斤拷锟街碉拷锟� 锟斤拷 PHP 5.4.0 锟斤拷锟斤拷效锟斤拷
JSON_OBJECT_AS_ARRAY (integer)
Decodes JSON objects as PHP array. This option can be added automatically by calling json_decode() with the second parameter equal to TRUE. Available since PHP 5.4.0.

锟斤拷锟斤拷某锟斤拷锟斤拷锟斤拷院锟� json_encode() 锟斤拷 form 选锟斤拷锟斤拷使锟矫★拷

JSON_HEX_TAG (integer)
锟斤拷锟叫碉拷 < 锟斤拷 > 转锟斤拷锟斤拷 \u003C 锟斤拷 \u003E锟斤拷 锟斤拷 PHP 5.3.0 锟斤拷锟斤拷效锟斤拷
JSON_HEX_AMP (integer)
锟斤拷锟叫碉拷 & 转锟斤拷锟斤拷 \u0026锟斤拷 锟斤拷 PHP 5.3.0 锟斤拷锟斤拷效锟斤拷
JSON_HEX_APOS (integer)
锟斤拷锟叫碉拷 ' 转锟斤拷锟斤拷 \u0027锟斤拷 锟斤拷 PHP 5.3.0 锟斤拷锟斤拷效锟斤拷
JSON_HEX_QUOT (integer)
锟斤拷锟叫碉拷 " 转锟斤拷锟斤拷 \u0022锟斤拷 锟斤拷 PHP 5.3.0 锟斤拷锟斤拷效锟斤拷
JSON_FORCE_OBJECT (integer)
使一锟斤拷锟角癸拷锟斤拷锟斤拷锟斤拷锟斤拷锟揭伙拷锟斤拷啵∣bject锟斤拷锟斤拷锟斤拷锟斤拷锟介。 锟斤拷锟斤拷锟斤拷为锟秸讹拷锟斤拷锟斤拷锟斤拷锟斤拷要一锟斤拷锟洁(Object锟斤拷锟斤拷时锟斤拷锟斤拷锟斤拷锟斤拷锟矫★拷 锟斤拷 PHP 5.3.0 锟斤拷锟斤拷效锟斤拷
JSON_NUMERIC_CHECK (integer)
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷郑锟絥umbers锟斤拷锟斤拷 锟斤拷 PHP 5.3.3 锟斤拷锟斤拷效锟斤拷
JSON_PRETTY_PRINT (integer)
锟矫空帮拷锟街凤拷锟斤拷式锟斤拷锟斤拷锟截碉拷锟斤拷锟捷★拷 锟斤拷 PHP 5.4.0 锟斤拷锟斤拷效锟斤拷
JSON_UNESCAPED_SLASHES (integer)
锟斤拷要锟斤拷锟斤拷 /锟斤拷 锟斤拷 PHP 5.4.0 锟斤拷锟斤拷效锟斤拷
JSON_UNESCAPED_UNICODE (integer)
锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟街斤拷 Unicode 锟街凤拷锟斤拷默锟斤拷锟角憋拷锟斤拷锟� \uXXXX锟斤拷锟斤拷 锟斤拷 PHP 5.4.0 锟斤拷锟斤拷效锟斤拷
JSON_PARTIAL_OUTPUT_ON_ERROR (integer)
Substitute some unencodable values instead of failing. Available since PHP 5.5.0.
JSON_PRESERVE_ZERO_FRACTION (integer)
Ensures that float values are always encoded as a float value. Available since PHP 5.6.6.
JSON_UNESCAPED_LINE_TERMINATORS (integer)
The line terminators are kept unescaped when JSON_UNESCAPED_UNICODE is supplied. It uses the same behaviour as it was before PHP 7.1 without this constant. Available since PHP 7.1.0.