Skip to content

[WIP] Reorganize the Serializer documentation #6428

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 3 commits into from

Conversation

GuilhemN
Copy link
Contributor

@GuilhemN GuilhemN commented Apr 3, 2016

Q A
Doc fix? yes (reorganization)
New docs? yes
Applies to 2.3 -> master
Fixed tickets #4698 (comment)

The aim of this PR is to split the Serializer component documentation into smaller articles: the encoders and the normalizers will have their own dedicated section.

The encoders documentation won't be necessary for everyone but it is always good to understand how they work. For example, I don't think that a lot of people knows that the XmlEncoder considers keys beginning with @ as attributes.
The JsonEncoder isn't really complex but it may be useful to know that it is based on the built in methods json_encode and json_decode.

The documentation about normalizers is much more needed as they are a great feature not much documented for now. The ObjectNormalizer (or the GetSetMethodNormalizer for the 2.3 branch) is enough in most of the cases but sometimes people want something even more powerful and could use custom normalizers if they knew more about them.

So please tell me if you like this reorganization and if you see anything to change before I start writing the sections about normalizers and encoders :-)

As a final result, the deserializer uses the ``first_name`` attribute as if
it were ``firstName`` and uses the ``getFirstName`` and ``setFirstName`` methods.

Using Callbacks to Serialize Properties with Object Instances
Copy link
Member

Choose a reason for hiding this comment

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

this should be moved to other chapters rather than removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I plan to move it to the normalizer doc ;-)

@GuilhemN GuilhemN force-pushed the SERIALIZER branch 2 times, most recently from da8a235 to 2d4ff3b Compare April 4, 2016 17:36
@GuilhemN
Copy link
Contributor Author

GuilhemN commented Apr 4, 2016

I wrote the doc about encoders.

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

Successfully merging this pull request may close these issues.

3 participants