- objects (collections of name-value pairs)
- arrays (ordered lists of values)
- strings (in double quotes)
- true, false, or null.
The decoding is handled by a parser based on the JSON_checker by Douglas Crockford.
There are different types of function are present in JSON:
- json_decode — This function is used to decodes a JSON string.
- json_encode — This function is used to return the JSON representation of a value.
- json_last_error_msg — This function is used to returns the error string of the last json_encode() or json_decode()call.
- json_last_error — This function is used to returns the last error occurred.