##Django declarative (de)serializers
Serializer
is a class that can serialize and deserialize objects like Django models from and to serialization format (json, xml, pyyaml). It is composed from two classes: NativeSerializer
and FormatSerializer
.
NativeSerializer
is for serializing and deserializing objects to/from python native datatypes:
- Iterables are serialized to list generators
- Objects are serialized to dicts
FormatSerializer
is for serializing and deserializing python native datatypes to/from serialization format (json, xml, pyyaml).
If some format is defined then user can serialize user_data to this format with 'serializers.serialize' function: