We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34366cc commit a38b44eCopy full SHA for a38b44e
components/serializer.rst
@@ -42,7 +42,7 @@ which Encoders and Normalizer are going to be available::
42
use Symfony\Component\Serializer\Encoder\JsonEncoder;
43
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;
44
45
- $encoders = array(new XmlEncoder(), new JsonEncoder());
+ $encoders = array('xml' => new XmlEncoder(), 'json' => new JsonEncoder());
46
$normalizers = array(new GetSetMethodNormalizer());
47
48
$serializer = new Serializer($normalizers, $encoders);
0 commit comments