Use native json_encode to convert treeView objects to JSON.

This should improve the performance.
This commit is contained in:
Jan Böhmer 2020-01-02 23:21:37 +01:00
parent fbcfc1f2a8
commit 811dca691b
4 changed files with 60 additions and 11 deletions

View file

@ -106,7 +106,7 @@ class AppExtension extends AbstractExtension
{
$tree = $this->treeBuilder->getTreeView(\get_class($element), null, $type, $element);
return $this->serializer->serialize($tree, 'json', ['skip_null_values' => true]);
return json_encode($tree);
}
/**