Discover the Serializer component
summary
Symfony’s Serializer now handles getters/setters, public properties and proxies and is bundled into Symfony so you don’t need JMS; it natively encodes JSON, XML, YAML and CSV and supports data: URI for files. Demo builds an API on the Symfony Demo blog, hides passwords via groups, converts names to snake_case, limits tree depth with max_depth, and resolves circular references by returning a URL handler. Custom normalizers add comment counts and canonical URLs; deserialization supports object_to_populate and bulk arrays — and it works.
AI-written summary · about
chapters (23)
- 0:00Introduction to Serializer
- 1:59History of Serializer
- 3:02What is Serialization
- 5:38Serializer Architecture
- 7:04Normalizers Explained
- 8:27Data URI Normalizer
- 9:54Using Normalizers
- 10:17Encoders Explained
- 11:23Using Encoders
- 12:47Creating a Serializer
- 13:53Symphony Demo App
- 15:20Building an API
- 17:04Serialization Groups
- 19:50Configuring Groups
- 20:54Name Converter
- 21:16Max Depth Handling
- 22:41Custom Normalizers
- 25:55Circular References
- 28:22Deserialization Basics
- 30:27Validation on Deserialization
- 31:09API Platform Integration
- 32:39Deserializing Arrays
- 33:26Summary and Tips
