Skip to content

Navigation Menu

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 864a1e1

Browse filesBrowse files
committed
feature #7040 [Serializer] Docs for CSV and YAML encoders (dunglas)
This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #7040). Discussion ---------- [Serializer] Docs for CSV and YAML encoders Docs for symfony/symfony#19197 and symfony/symfony#19326. Commits ------- 5687972 [Serializer] Docs for CSV and YAML encoders.
2 parents fc95754 + 5687972 commit 864a1e1
Copy full SHA for 864a1e1

File tree

1 file changed

+28
-0
lines changed
Filter options

1 file changed

+28
-0
lines changed

‎components/serializer.rst

Copy file name to clipboardExpand all lines: components/serializer.rst
+28Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,30 @@ There are several types of normalizers available:
540540
The ``JsonSerializableNormalizer``, ``DateTimeNormalizer`` and
541541
``DataUriNormalizer`` normalizers were added in Symfony 3.1
542542

543+
Encoders
544+
--------
545+
546+
The Serializer component supports many formats out of the box:
547+
548+
:class:`Symfony\\Component\\Serializer\\Encoder\\JsonEncoder`
549+
This class encodes and decodes data in JSON_.
550+
551+
:class:`Symfony\\Component\\Serializer\\Encoder\\XmlEncoder`
552+
This class encodes and decodes data in XML_.
553+
554+
:class:`Symfony\\Component\\Serializer\\Encoder\\YamlEncoder`
555+
This encoder encodes and decodes data in YAML_. This encoder requires the
556+
:doc:`Yaml Component </components/yaml>`.
557+
558+
:class:`Symfony\\Component\\Serializer\\Encoder\\CsvEncoder`
559+
This encoder encodes and decodes data in CSV_.
560+
561+
All these encoders are enabled by default when using the Symfony Standard Edition
562+
with the serializer enabled.
563+
564+
.. versionadded:: 3.2
565+
The ``YamlEncoder`` and ``CsvEncoder`` encoders were added in Symfony 3.2
566+
543567
Handling Circular References
544568
----------------------------
545569

@@ -692,3 +716,7 @@ Learn more
692716
.. _`JMS serializer`: https://github.com/schmittjoh/serializer
693717
.. _Packagist: https://packagist.org/packages/symfony/serializer
694718
.. _RFC3339: https://tools.ietf.org/html/rfc3339#section-5.8
719+
.. _JSON: http://www.json.org/
720+
.. _XML: https://www.w3.org/XML/
721+
.. _YAML: http://yaml.org/
722+
.. _CSV: https://tools.ietf.org/html/rfc4180

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.