Seeing another proposal for Customizable Serialization for the GSoC this year prompted me to dust off the bits of work I've done along similar lines. I'd really like to see this get properly addressed in core and I thought it was about time I helped to make it happen.
I've made a fairly comprehensive start, and pushed the results of what I have to date as the `django-serializers` project. It's available on PyPI, and the source is here: http://github.com/tomchristie/django-serializers There are some docs up on the GitHub site, but in brief it gives you: * A Declarative Serializer/Field API that mirrors the Form/Field API. * A Serializer class which can deal with arbitrary python objects. * A ModelSerializer class which can handle model instances and query sets. * A DumpDataSerializer class which mimics the existing dumpdata behaviour. * Supports flat or nested ouput, and deals with recursive structures. * Handles FK, M2M, OneToOne, and reverse relationships, model fields, and non-database attributes/properties. * Serialization structure decoupled from output encoding concerns. * Currently supports JSON, YAML, and XML. * Decent test suite of the above. It's not yet at the point where it could be a proposal for core - Right now the API isn't backwards compatible with the existing serializers, the dump data serializer is still missing some tweaks such as dealing with natural keys, and there's some work to do on the XML output. It is a pretty comprehensive start though, and I'm really happy with the shape of the API. Given that Piotr's GSoC proposal has now been accepted, I'm wondering what the right way forward is? I'd like to continue to push forward with this, but I'm also aware that it might be a bit of an issue if there's already an ongoing GSoC project along the same lines? Having taken a good look through the GSoC proposal, it looks good, and there seems to be a fair bit of overlap, so hopefully he'll find what I've done useful, and I'm sure I'll have plenty of comments on his project as it progresses. I'd consider suggesting a collaborative approach, but the rules of the GSoC wouldn't allow that right? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/RtFUTCF1iPUJ. 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.