Serializer
3 exercises work on this concept, by writing code in the browser.
In the tracks
In Practice
- A generic page of results, Page<Produit> Symfony 8.2's Serializer understands PHPDoc generics: a single Page class, holding Produit or Avis objects depending on the property that carries it.
- One name per API version, and groups to leave out #[SerializedName('name', groups: 'v1')]: a property changes name depending on the group; ignored_groups leaves a group out without touching the class.