Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed the serializer initialization for 2.0
  • Loading branch information
stof committed Feb 21, 2013
1 parent 34366cc commit a38b44e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/serializer.rst
Expand Up @@ -42,7 +42,7 @@ which Encoders and Normalizer are going to be available::
use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;

$encoders = array(new XmlEncoder(), new JsonEncoder());
$encoders = array('xml' => new XmlEncoder(), 'json' => new JsonEncoder());
$normalizers = array(new GetSetMethodNormalizer());

$serializer = new Serializer($normalizers, $encoders);
Expand Down

0 comments on commit a38b44e

Please sign in to comment.