This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony
Fabien Potencier db07500ed8 feature #17603 [Serializer] Add a normalizer that support JsonSerializable objects (mcfedr)
This PR was merged into the 3.1-dev branch.

Discussion
----------

[Serializer] Add a normalizer that support JsonSerializable objects

This normalizer makes it easier to start to combine using `JsonSerializable` objects with the Symfony serializer. I have implemented it in a number of projects and #13496 shows that others are doing so as well. So it seemed like it would be useful to include it in the Serializer component.

It handles circular references in the same way as the other normalizers.

Because groups and max depth are based on property annotations it doesn't make sense to apply them here.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13496
| License       | MIT
| Doc PR        |

Commits
-------

a678881 Add a normalizer that support JsonSerializable objects
2016-02-26 05:28:56 +01:00
..
Bridge Merge branch '3.0' 2016-02-23 17:17:05 +01:00
Bundle Add a normalizer that support JsonSerializable objects 2016-02-25 21:06:29 +02:00
Component feature #17603 [Serializer] Add a normalizer that support JsonSerializable objects (mcfedr) 2016-02-26 05:28:56 +01:00