이 확장은 다음의 상수들을 정의합니다. 이 확장을 PHP에 내장했거나, 실행시에 동적으로 읽어들일 경우에만 사용할 수 있습니다.
다음 상수들은 json_last_error()에서 반환하는 오류 형식을 나타냅니다.
JSON_ERROR_NONE
(integer)
JSON_ERROR_DEPTH
(integer)
JSON_ERROR_STATE_MISMATCH
(integer)
JSON_ERROR_CTRL_CHAR
(integer)
JSON_ERROR_SYNTAX
(integer)
JSON_ERROR_UTF8
(integer)
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.
This constant is available as of 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.
This constant is available as of 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.
This constant is available as of PHP 5.5.0.
다음 상수들은 json_encode()에서 옵션값을 설정하기 위해 결합될 수 있습니다.
JSON_HEX_TAG
(integer)
JSON_HEX_AMP
(integer)
JSON_HEX_APOS
(integer)
JSON_HEX_QUOT
(integer)
JSON_FORCE_OBJECT
(integer)
JSON_NUMERIC_CHECK
(integer)
JSON_BIGINT_AS_STRING
(integer)
JSON_PRETTY_PRINT
(integer)
JSON_UNESCAPED_SLASHES
(integer)
JSON_UNESCAPED_UNICODE
(integer)