serialization
Content negotiation and data serialization framework. Automatically selects the correct serializer based on the HTTP Accept header, then serializes the controller's return value into the response body.
Attributes
smisk.serialization.serializersA list of registered
Serializerinstances, ordered by priority.
Classes
- class
smisk.serialization.Serializer -
Abstract base class for serializers.
serialize(value, request, response)Write value to the response. Must be implemented by subclasses.
deserialize(request)Parse the request body and return a Python object. Must be implemented by subclasses.
Modules
- all — registers all built-in serializers
- json — JSON serializer
- php_serial — PHP serialization format
- plain_text — plain text serializer
- plist — Apple property list serializer
- python_pickle — Python pickle serializer
- python_py — Python repr serializer
- xhtml — XHTML serializer
- xmlbase — XML base classes
- xmlgeneric — Generic XML serializer
- xmlrpc — XML-RPC serializer
- xspf — XSPF playlist serializer
- yaml_serial — YAML serializer