serializers Module
Serializer/Deserializer for a JSON API resource object, used by adapter.
When extending use a mixin or define transform methods to serialize and/or deserializer attributes based on the name or the type of attribute.
The methods use a naming convention:
- '[de]serialize' + 'AttrName' or 'TypeName' + 'Attribute'
- E.g. use
serializeNameAttribute
anddeserializeNameAttribute
in a generated serializer for use withname: attr()
- Or, redefine
serializeDateAttribute
anddeserializeDateAttribute
to use your own data transformation withattr('date')
the default, Date type [de]serialize methods transfrom to/from ISO Format. - Transform methods based on the name of the attribute will be called instead of any transform methods based on the type of the attribute.
This module provides the following classes: