array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'json.constants.php', 1 => 'Constantes predefinidas', ), 'up' => array ( 0 => 'book.json.php', 1 => 'JSON', ), 'prev' => array ( 0 => 'json.resources.php', 1 => 'Tipos de recursos', ), 'next' => array ( 0 => 'class.jsonserializable.php', 1 => 'JsonSerializable', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'es', 'path' => 'reference/json/constants.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
Estas constantes están definidas por esta extensión y estarán disponibles sólo cuando la extensión haya sido compilada con PHP, o bien sea cargada dinámicamente en ejecución.
Las siguientes constantes indican el tipo de error retornado por 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)
El objeto o array pasado a json_encode() incluye
referencias recursivas y no se puede codificar.
Si se proporcionó la opción JSON_PARTIAL_OUTPUT_ON_ERROR
,
se codificará null
en el lugar de la referencia recursiva.
Esta constante está disponible a partir de PHP 5.5.0.
JSON_ERROR_INF_OR_NAN
(integer)
El valor pasado a json_encode() incluye
NAN
o INF
.
Si se proporcionó la opción JSON_PARTIAL_OUTPUT_ON_ERROR
,
se codificará 0
en el lugar de estos números
especiales.
Esta constante está disponible a partir de PHP 5.5.0.
JSON_ERROR_UNSUPPORTED_TYPE
(integer)
Se proporcionó un valor de un tipo no admitido para
json_encode(), tal como un resource.
Si se proporcionó la opción JSON_PARTIAL_OUTPUT_ON_ERROR
,
se codificará null
en el lugar del valor no admitido.
Esta constante está disponible a partir de PHP 5.5.0.
Las siguientes constantes se pueden combinar para obtener opciones para 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)
/
.
Disponible desde PHP 5.4.0.
JSON_UNESCAPED_UNICODE
(integer)
JSON_PARTIAL_OUTPUT_ON_ERROR
(integer)
JSON_PRESERVE_ZERO_FRACTION
(integer)