JSON
6 entries
json_decode
Parses a JSON string into a value.
json_encode
Serializes a value into a JSON string.
json_encode flags
Common json_encode flags: JSON_PRETTY_PRINT for pretty printing, JSON_UNESCAPED_UNICODE to keep CJK raw, JSON_UNESCAPED_SLASHES to keep slashes raw.
json_last_error
Returns the error code of the most recent JSON encode/decode operation.
json_last_error_msg
Turns the error code of the most recent JSON operation into a human-readable English message; pairs with json_last_error.
json_validate
Checks whether a string is syntactically valid JSON (PHP 8.3+, without building the value).