We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4a18c3 commit 47df47eCopy full SHA for 47df47e
src/Drivers/ObjectDriver.php
@@ -24,6 +24,12 @@ public function serialize($data): string
24
25
$serializer = new Serializer($normalizers, $encoders);
26
27
+ // The Symfony serialized doesn't support `stdClass` yet.
28
+ // This may be removed when Symfony 5.1 is released.
29
+ if ($data instanceof \stdClass) {
30
+ $data = (array) $data;
31
+ }
32
+
33
return $serializer->serialize(
34
$data,
35
'json',
0 commit comments