{
    "content": {
        "text": "Predefined Constants\nThe constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.\n\nThe following constants indicate the type of error returned by json_last_error() or stored as the code of a JsonException.\n\nJSON_ERROR_NONE (int)\nNo error has occurred.\nJSON_ERROR_DEPTH (int)\nThe maximum stack depth has been exceeded.\nJSON_ERROR_STATE_MISMATCH (int)\nOccurs with underflow or with the modes mismatch.\nJSON_ERROR_CTRL_CHAR (int)\nControl character error, possibly incorrectly encoded.\nJSON_ERROR_SYNTAX (int)\nSyntax error.\nJSON_ERROR_UTF8 (int)\nMalformed UTF-8 characters, possibly incorrectly encoded.\nJSON_ERROR_RECURSION (int)\nThe 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.\nJSON_ERROR_INF_OR_NAN (int)\nThe 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.\nJSON_ERROR_UNSUPPORTED_TYPE (int)\nA 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.\nJSON_ERROR_INVALID_PROPERTY_NAME (int)\nA key starting with \\u0000 character was in the string passed to json_decode() when decoding a JSON object into a PHP object.\nJSON_ERROR_UTF16 (int)\nSingle unpaired UTF-16 surrogate in unicode escape contained in the JSON string passed to json_decode().\nJSON_ERROR_NON_BACKED_ENUM (int)\nThe value passed to json_encode() includes a non-backed enum which cannot be serialized. Available as of PHP 8.1.0.\nThe following constants can be combined to form options for json_decode().\n\nJSON_BIGINT_AS_STRING (int)\nDecodes large integers as their original string value.\nJSON_OBJECT_AS_ARRAY (int)\nDecodes JSON objects as PHP array. This option can be added automatically by calling json_decode() with the second parameter equal to true.\nThe following constants can be combined to form options for json_encode().\n\nJSON_HEX_TAG (int)\nAll < and > are converted to \\u003C and \\u003E.\nJSON_HEX_AMP (int)\nAll & are converted to \\u0026.\nJSON_HEX_APOS (int)\nAll ' are converted to \\u0027.\nJSON_HEX_QUOT (int)\nAll \" are converted to \\u0022.\nJSON_FORCE_OBJECT (int)\nOutputs an object rather than an array when a non-associative array is used. Especially useful when the recipient of the output is expecting an object and the array is empty.\nJSON_NUMERIC_CHECK (int)\nEncodes numeric strings as numbers.\nJSON_PRETTY_PRINT (int)\nUse whitespace in returned data to format it.\nJSON_UNESCAPED_SLASHES (int)\nDon't escape \/.\nJSON_UNESCAPED_UNICODE (int)\nEncode multibyte Unicode characters literally (default is to escape as \\uXXXX).\nJSON_PARTIAL_OUTPUT_ON_ERROR (int)\nSubstitute some unencodable values instead of failing.\nJSON_PRESERVE_ZERO_FRACTION (int)\nEnsures that float values are always encoded as a float value.\nJSON_UNESCAPED_LINE_TERMINATORS (int)\nThe 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 as of PHP 7.1.0.\nThe following constants can be combined to form options for json_decode() and json_encode().\n\nJSON_INVALID_UTF8_IGNORE (int)\nIgnore invalid UTF-8 characters. Available as of PHP 7.2.0.\nJSON_INVALID_UTF8_SUBSTITUTE (int)\nConvert invalid UTF-8 characters to \\0xfffd (Unicode Character 'REPLACEMENT CHARACTER') Available as of PHP 7.2.0.\nJSON_THROW_ON_ERROR (int)\nThrows JsonException if an error occurs instead of setting the global error state that is retrieved with json_last_error() and json_last_error_msg(). JSON_PARTIAL_OUTPUT_ON_ERROR takes precedence over JSON_THROW_ON_ERROR. Available as of PHP 7.3.0.",
        "summary": "This document outlines the predefined constants for JSON error handling in PHP, including error codes and options for encoding and decoding JSON data.",
        "keywords": [
            "PHP",
            "JSON",
            "constants",
            "error handling",
            "json_encode",
            "json_decode"
        ],
        "entities": {
            "constants": [
                "JSON_ERROR_NONE",
                "JSON_ERROR_DEPTH",
                "JSON_ERROR_STATE_MISMATCH",
                "JSON_ERROR_CTRL_CHAR",
                "JSON_ERROR_SYNTAX",
                "JSON_ERROR_UTF8",
                "JSON_ERROR_RECURSION",
                "JSON_ERROR_INF_OR_NAN",
                "JSON_ERROR_UNSUPPORTED_TYPE",
                "JSON_ERROR_INVALID_PROPERTY_NAME",
                "JSON_ERROR_UTF16",
                "JSON_ERROR_NON_BACKED_ENUM"
            ],
            "options": [
                "JSON_BIGINT_AS_STRING",
                "JSON_OBJECT_AS_ARRAY",
                "JSON_HEX_TAG",
                "JSON_HEX_AMP",
                "JSON_HEX_APOS",
                "JSON_HEX_QUOT",
                "JSON_FORCE_OBJECT",
                "JSON_NUMERIC_CHECK",
                "JSON_PRETTY_PRINT",
                "JSON_UNESCAPED_SLASHES",
                "JSON_UNESCAPED_UNICODE",
                "JSON_PARTIAL_OUTPUT_ON_ERROR",
                "JSON_PRESERVE_ZERO_FRACTION",
                "JSON_UNESCAPED_LINE_TERMINATORS",
                "JSON_INVALID_UTF8_IGNORE",
                "JSON_INVALID_UTF8_SUBSTITUTE",
                "JSON_THROW_ON_ERROR"
            ]
        },
        "links": {
            "original": "https:\/\/data.aisenseapi.com\/\/content\/2025\/10\/25\/content_1761422039_28fc714e0185_posttext.txt"
        },
        "structured_data": [],
        "ai_meta": {
            "token_est": 1500,
            "chars": 8000,
            "crawler_hint": "high",
            "richness_score": 0.9,
            "embedding_ready": true
        },
        "reasoning": "The content provides a detailed list of constants and error codes related to JSON handling in PHP, along with user-contributed notes that offer practical examples and warnings. This structure is best captured in a technical documentation schema."
    },
    "@context": "https:\/\/schema.org",
    "@type": "Technical Documentation"
}