Skip to content

[Component][Serializer] Adding a brand new chapter on the Serializer Component #1684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

[Component][Serializer] Adding a brand new chapter on the Serializer Component #1684

wants to merge 4 commits into from

Conversation

loalf
Copy link

@loalf loalf commented Sep 5, 2012

There wasn´t any documentation about this component, just thought it was worth it something than nothing.

Todo:

  • Explain how to create a new encoder
  • Explain how to create a new normalizer
  • Explain how the GetSetMethodNormalizer works
  • Explain how the Serializer knows that 'json' is linked to the JsonEncoder

use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Normalizer\GetSetMethodNormalizer;

$encoders = array(new XmlEncoder(), new JsonEncoder() );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should remove the space between JsonEncoder() and ); (and maybe put this on 3 lines with a comma after each item)

weaverryan added a commit that referenced this pull request Sep 14, 2012
@weaverryan
Copy link
Member

Hi Javier!

This is excellent! I'm so glad someone has finally bootstrapped this section - and with an image! :)

I've made a few changes, tweaked a few things - let me know if you see anything that needs changes. I also patched this into the 2.0 branch at the following commits:

Thanks!

@weaverryan weaverryan closed this Sep 14, 2012
@loalf
Copy link
Author

loalf commented Sep 14, 2012

That´s brilliant! My first contribution to the symfony docs, ;). By the way, the image is not showing up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants