Commit 286634e9 authored by dbourdere's avatar dbourdere :cartwheel:
Browse files

use symfony encode instead of json_encode

Showing with 2 additions and 1 deletion
+2 -1
......@@ -36,7 +36,8 @@ class JsonSerializer
{
$array = self::getInstance()->normalize($object);
$arrayfiltered = self::array_filter_recursive($array, function($v){return $v !== null;});
$object = json_encode($arrayfiltered);
$jsonEncoder = new JsonEncoder();
$object = $jsonEncoder->encode($arrayfiltered, 'json');
return $object;
}
......
Supports Markdown
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