php-json is an extremely fast PHP C extension for JSON (JavaScript Object Notation) serialisation. php-json uses a forked version of json-c.

The extension allow to encode/decode variables between PHP and JSON. For example :

$output = json_encode($val);
echo $output."n";

Produce
{ “abc”: 12, “foo”: “bar”, “bool0”: false, “bool1”: true, “arr”: [ 1, 2, 3, null, 5 ], “float”: 1.2345 }

While :


$input = '{ "abc": 12, "foo": "bar", "bool0": false, "bool1": true, "arr": [ 1, 2, 3, null, 5 ], "float": 1.2345 }';
$val = json_decode($input);
echo $val->abc."n";

Will produce 12.