Skip to content

Commit beac11e

Browse files
committed
Use the built-in serializer instead of promoting JMS
1 parent 6d17756 commit beac11e

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

cookbook/serializer.rst

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ How to Use the Serializer
66

77
Serializing and deserializing to and from objects and different formats (e.g.
88
JSON or XML) is a very complex topic. Symfony comes with a
9-
:doc:`Serializer Component</components/serializer>`, which gives you some
9+
:doc:`Serializer Component </components/serializer>`, which gives you some
1010
tools that you can leverage for your solution.
1111

1212
In fact, before you start, get familiar with the serializer, normalizers
13-
and encoders by reading the :doc:`Serializer Component</components/serializer>`.
14-
You should also check out the `JMSSerializerBundle`_, which expands on the
15-
functionality offered by Symfony's core serializer.
13+
and encoders by reading the :doc:`Serializer Component </components/serializer>`.
1614

1715
Activating the Serializer
1816
-------------------------
@@ -56,15 +54,15 @@ Adding Normalizers and Encoders
5654
-------------------------------
5755

5856
Once enabled, the ``serializer`` service will be available in the container
59-
and will be loaded with two :ref:`encoders<component-serializer-encoders>`
57+
and will be loaded with two :ref:`encoders <component-serializer-encoders>`
6058
(:class:`Symfony\\Component\\Serializer\\Encoder\\JsonEncoder` and
6159
:class:`Symfony\\Component\\Serializer\\Encoder\\XmlEncoder`)
62-
but no :ref:`normalizers<component-serializer-normalizers>`, meaning you'll
60+
but no :ref:`normalizers <component-serializer-normalizers>`, meaning you'll
6361
need to load your own.
6462

6563
You can load normalizers and/or encoders by tagging them as
66-
:ref:`serializer.normalizer<reference-dic-tags-serializer-normalizer>` and
67-
:ref:`serializer.encoder<reference-dic-tags-serializer-encoder>`. It's also
64+
:ref:`serializer.normalizer <reference-dic-tags-serializer-normalizer>` and
65+
:ref:`serializer.encoder <reference-dic-tags-serializer-encoder>`. It's also
6866
possible to set the priority of the tag in order to decide the matching order.
6967

7068
Here is an example on how to load the
@@ -100,5 +98,3 @@ Here is an example on how to load the
10098
));
10199
$definition->addTag('serializer.normalizer');
102100
$container->setDefinition('get_set_method_normalizer', $definition);
103-
104-
.. _JMSSerializerBundle: http://jmsyst.com/bundles/JMSSerializerBundle

0 commit comments

Comments
 (0)