8000 Wrapped lines and added versionadded directives · symfony/symfony-docs@e0fc9a0 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e0fc9a0

Browse files
committed
Wrapped lines and added versionadded directives
1 parent ada8440 commit e0fc9a0

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

components/serializer.rst

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -606,12 +606,11 @@ There are several types of normalizers available:
606606
Encoders
607607
--------
608608

609-
Encoders basically turn **arrays** into **formats** and vice versa.
610-
They implement
611-
:class:`Symfony\\Component\\Serializer\\Encoder\\EncoderInterface` for
612-
encoding (array to format) and
613-
:class:`Symfony\\Component\\Serializer\\Encoder\\DecoderInterface` for
614-
decoding (format to array).
609+
Encoders turn **arrays** into **formats** and vice versa. They implement
610+
:class:`Symfony\\Component\\Serializer\\Encoder\\EncoderInterface`
611+
for encoding (array to format) and
612+
:class:`Symfony\\Component\\Serializer\\Encoder\\DecoderInterface` for decoding
613+
(format to array).
615614

616615
You can add new encoders to a Serializer instance by using its second constructor argument::
617616

@@ -625,7 +624,7 @@ You can add new encoders to a Serializer instance by using its second constructo
625624
Built-in Encoders
626625
~~~~~~~~~~~~~~~~~
627626

628-
The Serializer component provides built-in encoders:
627+
The Serializer component provides several built-in encoders:
629628

630629
:class:`Symfony\\Component\\Serializer\\Encoder\\JsonEncoder`
631630
This class encodes and decodes data in JSON_.
@@ -654,7 +653,11 @@ The ``CsvEncoder``
654653

655654
The ``CsvEncoder`` encodes to and decodes from CSV.
656655

657-
You can pass the context key ``as_collection`` in order to have the results always as a collection.
656+
You can pass the context key ``as_collection`` in order to have the results
657+
always as a collection.
658+
659+
.. versionadded:: 4.1
660+
The ``as_collection`` option was introduced in Symfony 4.1.
658661

659662
The ``XmlEncoder``
660663
~~~~~~~~~~~~~~~~~~
@@ -684,7 +687,11 @@ Be aware that this encoder will consider keys beginning with ``@`` as attributes
684687
// <foo bar="value" />
685688
// </response>
686689

687-
You can pass the context key ``as_collection`` in order to have the results always as a collection.
690+
You can pass the context key ``as_collection`` in order to have the results
691+
always as a collection.
692+
693+
.. versionadded:: 4.1
694+
The ``as_collection`` option was introduced in Symfony 4.1.
688695

689696
The ``YamlEncoder``
690697
~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)
0