yml_reference.rst 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. YAML Reference
  2. --------------
  3. ::
  4. # MyBundle\Resources\config\serializer\ClassName.yml
  5. Fully\Qualified\ClassName:
  6. exclusion_policy: ALL
  7. xml_root_name: foobar
  8. exclude: true
  9. access_type: public_method # defaults to property
  10. accessor_order: custom
  11. custom_accessor_order: [propertyName1, propertyName2, ..., propertyNameN]
  12. properties:
  13. some-property:
  14. exclude: true
  15. expose: true
  16. access_type: public_method # defaults to property
  17. type: string
  18. serialized_name: foo
  19. since_version: 1.0
  20. until_version: 1.1
  21. groups: [foo, bar]
  22. xml_attribute: true
  23. inline: true
  24. read_only: true
  25. xml_list:
  26. inline: true
  27. entry_name: foo
  28. xml_map:
  29. inline: true
  30. key_attribute_name: foo
  31. entry_name: bar
  32. callback_methods:
  33. pre_serialize: [foo, bar]
  34. post_serialize: [foo, bar]
  35. post_deserialize: [foo, bar]