@@ -6,13 +6,11 @@ How to Use the Serializer
6
6
7
7
Serializing and deserializing to and from objects and different formats (e.g.
8
8
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
10
10
tools that you can leverage for your solution.
11
11
12
12
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 >`.
16
14
17
15
Activating the Serializer
18
16
-------------------------
@@ -56,15 +54,15 @@ Adding Normalizers and Encoders
56
54
-------------------------------
57
55
58
56
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 >`
60
58
(:class: `Symfony\\ Component\\ Serializer\\ Encoder\\ JsonEncoder ` and
61
59
: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
63
61
need to load your own.
64
62
65
63
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
68
66
possible to set the priority of the tag in order to decide the matching order.
69
67
70
68
Here is an example on how to load the
@@ -100,5 +98,3 @@ Here is an example on how to load the
100
98
));
101
99
$definition->addTag('serializer.normalizer');
102
100
$container->setDefinition('get_set_method_normalizer', $definition);
103
-
104
- .. _JMSSerializerBundle : http://jmsyst.com/bundles/JMSSerializerBundle
0 commit comments