JavaScript Object Notation
Introduction
This extension implements the » JavaScript Object Notation (JSON) data-interchange format. PHP comes with a parser that is specifically written for PHP and licensed under the PHP license.
Note:
PHP implements a superset of JSON as specified in the original » RFC 7159.
- Installing/Configuring
- Predefined Constants
- JsonException — The JsonException class
- JsonSerializable — The JsonSerializable interface
- JsonSerializable::jsonSerialize — Specify data which should be serialized to JSON
- JSON Functions
- json_decode — Decodes a JSON string
- json_encode — Returns the JSON representation of a value
- json_last_error — Returns the last error occurred
- json_last_error_msg — Returns the error string of the last json_validate(), json_encode() or json_decode() call
- json_validate — Checks if a string contains valid JSON
↑ and ↓ to navigate • Enter to select • Esc to close • / to open