Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Serializer] add documentation for serializer callbacks #3701

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

Conversation

cordoval
Copy link
Contributor

related symfony/symfony#10229

Q A
Doc fix? no
New docs? yes
Applies to 2.3+
Fixed tickets self 👶
License CC-ASA 3.0 Unported

Sent using Gush

@cordoval
Copy link
Contributor Author

you may cook/grill me now @wouterj @weaverryan 👶

Using Callbacks to Serialize DateTime Objects
---------------------------------------------

If you have DateTime type fields or need special formatting needs when deserializing
Copy link
Member

Choose a reason for hiding this comment

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

remove the needs

Copy link
Member

Choose a reason for hiding this comment

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

If you use the datetime field type [...]

Copy link
Member

Choose a reason for hiding this comment

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

Btw, I don't like mentioning something from the Form component docs into the Serializer component docs

Copy link
Member

Choose a reason for hiding this comment

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

oh, wait. Now I see what you mean by "type fields". Just use "If a property of an object contains a DateTime instance or [...]"

Copy link
Member

Choose a reason for hiding this comment

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

hmm, now I think more about it, we should just remove the complete DateTime thing from this section and only use it in the code example.

@@ -181,6 +181,37 @@ method on the normalizer definition::
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.

with

@weaverryan
Copy link
Member

I like it, great work Luis!

weaverryan added a commit that referenced this pull request Apr 2, 2014
… (cordoval)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #3701).

Discussion
----------

[Serializer] add documentation for serializer callbacks

related symfony/symfony#10229

| Q             | A                   |
| ---           | ---                 |
| Doc fix?      | no                  |
| New docs?     | yes                 |
| Applies to    | 2.3+                |
| Fixed tickets | self 👶      |
| License       | CC-ASA 3.0 Unported |

 Sent using [Gush](https://github.com/gushphp/gush)

Commits
-------

b865b40 add comma madness and lowercasing W
efe2029 plug new revision
eabdbd0 add serializer set callback documentation
@weaverryan weaverryan closed this Apr 2, 2014
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