for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
if (!function_exists('json5_decode')) {
/**
* Takes a JSON encoded string and converts it into a PHP variable.
*
* The parameters exactly match PHP's json_decode() function - see
* http://php.net/manual/en/function.json-decode.php for more information.
* @param string $source The JSON string being decoded.
* @param bool $associative When TRUE, returned objects will be converted into associative arrays.
* @param int $depth User specified recursion depth.
* @param int $options Bitmask of JSON decode options.
* @return mixed
*/
function json5_decode($source, $associative = false, $depth = 512, $options = 0)
{
return \ColinODell\Json5\Json5Decoder::decode($source, $associative, $depth, $options);
}
// PHP 5.3 compatibility
if (!defined('JSON_BIGINT_AS_STRING')) {
define('JSON_BIGINT_AS_STRING', 2);
if (!defined('JSON_OBJECT_AS_ARRAY')) {
define('JSON_OBJECT_AS_ARRAY', 1);