@@ -5,18 +5,18 @@ How to Create your Custom Encoder
5
5
=================================
6
6
7
7
The :doc: `Serializer Component </components/serializer >` uses Normalizers
8
- to transform any data to an array that can be then converted in whatever
9
- data-structured language you want thanks to Encoders .
8
+ to transform any data to an array. Then, by leveraging * Encoders *, that data can
9
+ be convereted into any data-structure (e.g. JSON) .
10
10
11
11
The Component provides several built-in encoders that are described
12
12
:doc: `in their own section </serializer/encoders >` but you may want
13
- to use another language not supported.
13
+ to use another structure that's not supported.
14
14
15
15
Creating a new encoder
16
16
----------------------
17
17
18
18
Imagine you want to serialize and deserialize Yaml. For that you'll have to
19
- create your own encoder that may use the
19
+ create your own encoder that uses the
20
20
:doc: `Yaml Component </components/yaml >`::
21
21
22
22
namespace AppBundle\Encoder;
@@ -51,9 +51,9 @@ create your own encoder that may use the
51
51
Registering it in your app
52
52
--------------------------
53
53
54
- If you use the Symfony Framework then you probably want to register this encoder
55
- as a service in your app. Then you only need to tag it as ` serializer.encoder ` and it will be
56
- injected in the Serializer.
54
+ If you use the Symfony Framework. then you probably want to register this encoder
55
+ as a service in your app. Then, you only need to tag it with `` serializer.encoder ``
56
+ to inject your custom encoder into the Serializer.
57
57
58
58
.. configuration-block ::
59
59
0 commit comments