PHP - Json
About
In php, you can:
- create a json string with json_encode (the property of an object should be public or you need to implements JsonSerializable
- create a Json object or an array with json_decode
Snippet
Parse a string as JSON
// Otherwise you get an object ie $arrayFormat-> syntax
$arrayFormat = true;
$json = json_decode($match, $arrayFormat);
// Decodage problem
if ($json == null) {
// Error
}