From 79ea93839f45f913b9119f047f710f67c132a578 Mon Sep 17 00:00:00 2001 From: Andrey Date: Wed, 30 Aug 2017 17:13:44 +0300 Subject: [PATCH] fix #8321 minor changes in Serializer Component --- components/serializer.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/serializer.rst b/components/serializer.rst index d6c7434dfab..57302a94d2c 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -418,9 +418,9 @@ and :class:`Symfony\\Component\\Serializer\\Normalizer\\PropertyNormalizer`:: $obj->name = 'Acme Inc.'; $obj->address = '123 Main Street, Big City'; - $json = $serializer->serialize($obj); + $json = $serializer->serialize($obj, 'json'); // {"org_name": "Acme Inc.", "org_address": "123 Main Street, Big City"} - $objCopy = $serializer->deserialize($json); + $objCopy = $serializer->deserialize($json, Company::class, 'json'); // Same data as $obj .. _using-camelized-method-names-for-underscored-attributes: