Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions serializer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,8 @@ You can also specify a context specific to normalization or denormalization:
attributes:
createdAt:
contexts:
- normalizationContext: { datetime_format: 'Y-m-d' }
denormalizationContext: { datetime_format: !php/const \DateTime::RFC3339 }
- normalization_context: { datetime_format: 'Y-m-d' }
denormalization_context: { datetime_format: !php/const \DateTime::RFC3339 }

.. code-block:: xml

Expand Down Expand Up @@ -1371,7 +1371,7 @@ normalizers (in order of priority):

$propertyInfo = new PropertyInfoExtractor([], [new PhpDocExtractor(), new ReflectionExtractor()]);
$normalizers = [new ObjectNormalizer(new ClassMetadataFactory(new AttributeLoader()), null, null, $propertyInfo), new ArrayDenormalizer()];

$this->serializer = new Serializer($normalizers, [new JsonEncoder()]);

:class:`Symfony\\Component\\Serializer\\Normalizer\\ObjectNormalizer`
Expand Down