Indivo serializers
Module for abstract serializer base classes.
Differentiated from the Django base serializer by allowing implementing serializers to process nested objects. Recursion is prevented by keeping track of visited objects, and results in repeated objects being skipped after their first appearance
Bases: object
Deserialization is not currently supported
Bases: object
Deserialization is not supported
Bases: exceptions.Exception
Object encountered twice during serialization
Bases: django.core.serializers.base.Serializer
Abstract serializer base class.
Called to handle a OneToMany field.
Serialize a queryset.
Bases: object
Abstract base class for defining serializers that should be attached to a data model class.
Serializers will override the default implementations. Subclasses should define any of three methods:
In order to be called, the methods must be attached to that data model class by calling the attach_to_data_model() method.
Add all of the defined methods as classmethods on data_model_cls.
Indivo JSON Serializer
Bases: simplejson.encoder.JSONEncoder
Encodes datetime/date/time as ISO8601
Bases: indivo.serializers.python.Serializer
Convert a queryset to JSON.
Indivo Python Serializer
Deserialization is not currently supported
Bases: indivo.serializers.base.Serializer
Serializes a QuerySet to basic Python objects. - Parses foreign key and many-to-many fields into nested objects - Output mirrors Indivo SDML format
Indivo custom XML serializer
Bases: indivo.serializers.base.Deserializer
Deserialization is not currently supported
Bases: indivo.serializers.base.Serializer
Serializes a QuerySet to XML. Foreign Key and Many-to-Many fields are processed as sub-objects.
Called after handling all fields for an object.
End serialization – end the document.
Called to handle each field on an object (except for ForeignKeys and ManyToManyFields)
Called to handle a ForeignKey (we need to treat them slightly differently from regular fields).
Called to handle a ManyToManyField.
Called as each object is handled.
Start serialization