b374k
m1n1 1.01
Apache/2.4.41 (Ubuntu)
Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64
uid=33(www-data) gid=33(www-data) groups=33(www-data)
server ip : 62.171.164.128 | your ip : 127.0.0.1
safemode OFF
 >  / home / a / home / dev2.destoffenstraat.com / vendor / jms / serializer / doc / reference /
Filename/home/a/home/dev2.destoffenstraat.com/vendor/jms/serializer/doc/reference/yml_reference.rst
Size2.76 kb
Permissionrw-r--r--
Ownerroot : root
Create time21-Aug-2025 12:26
Last modified22-Feb-2020 21:59
Last accessed24-Aug-2025 07:30
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
YAML Reference
--------------
::

# Vendor\MyBundle\Resources\config\serializer\Model.ClassName.yml
Vendor\MyBundle\Model\ClassName:
exclusion_policy: ALL
xml_root_name: foobar
xml_root_namespace: http://your.default.namespace
exclude: true
read_only: false
access_type: public_method # defaults to property
accessor_order: custom
custom_accessor_order: [propertyName1, propertyName2, ..., propertyNameN]
discriminator:
field_name: type
disabled: false
map:
some-value: ClassName
groups: [foo, bar]
xml_attribute: true
xml_element:
cdata: false
namespace: http://www.w3.org/2005/Atom
virtual_properties:
getSomeProperty:
serialized_name: foo
type: integer
expression_prop:
exp: object.getName()
serialized_name: foo
type: integer
xml_namespaces:
"": http://your.default.namespace
atom: http://www.w3.org/2005/Atom
properties:
some-property:
exclude: true
expose: true
exclude_if: expr
expose_if: expr
skip_when_empty: false
access_type: public_method # defaults to property
accessor: # access_type must be set to public_method
getter: getSomeOtherProperty
setter: setSomeOtherProperty
type: string
serialized_name: foo
since_version: 1.0
until_version: 1.1
groups: [foo, bar]
xml_attribute: true
xml_value: true
inline: true
read_only: true
xml_key_value_pairs: true
xml_list:
inline: true
entry_name: foo
namespace: http://www.w3.org/2005/Atom
xml_map:
inline: true
key_attribute_name: foo
entry_name: bar
namespace: http://www.w3.org/2005/Atom
xml_attribute_map: true
xml_element:
cdata: false
namespace: http://www.w3.org/2005/Atom
max_depth: 2

handler_callbacks:
serialization:
xml: serializeToXml
json: serializeToJson
deserialization:
xml: deserializeFromXml

callback_methods:
pre_serialize: [foo, bar]
post_serialize: [foo, bar]
post_deserialize: [foo, bar]