Commit a6277bc8 by pupi1985

Fix that allows the custom json_decode function to match the native PHP declaration

parent 469220b9
......@@ -1610,13 +1610,13 @@
function json_encode($json)
{
$service = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
$service = new Services_JSON();
return $service->encode($json);
}
function json_decode($json)
function json_decode($json, $assoc = false)
{
$service = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
$service = new Services_JSON($assoc ? SERVICES_JSON_LOOSE_TYPE : 0);
return $service->decode($json);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment