Hi !

Again ! on this topic many times discussed :

http://groups.google.com/group/django-developers/search?group=django-developers&q=serialization&qt_g=Search+this+group
https://code.djangoproject.com/wiki/SummerOfCode2011#Customizableserialization

I came up with a framework that feels right to use (imo), allows to
customize literally everything, fulfils all the requirements listed in
the GSoC page, but is still (imo) quite simple. I thought I would
suggest it as a candidate for the new Django serialization framework
(in which case I am of course volunteering for the integration !).

The thing would be then to handle serialization (same goes for
deserialization) as a 2 steps process :
<complex object> -------{ the framework }-----> <intermediary object>
---{ specialized library }----> <serial format>

<intermediary object> would be whatever { specialized library }
accepts as an input. For example, for serializing to JSON,
<intermediary object> is a composition of dicts, lists, ints,
strings, ... And for XML, this <intermediary object> is whatever the
xml library handles (e.g. xml.etree.ElementTree.Element, or whatever).

The syntax for using my framework is django-ish :

- Declaring a serializer (deserializer, or whatever operation) :
http://dpaste.com/634114/

- Specifying what to output for django serializers : http://dpaste.com/634128/

More examples there (with links to API doc) : 
http://any2any.posterous.com/introducing-any2any
Repo : https://bitbucket.org/sebpiq/any2any

Any comments, thoughts, critics are much appreciated.

Cheers,

Sébastien

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to