Commit 286634e9 authored by dbourdere's avatar dbourdere 🤠

use symfony encode instead of json_encode

parent 696d6e26
......@@ -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;
}
......
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