Do you know Colander? https://github.com/Pylons/colander
- D 2012/8/28 Tom Christie <christie....@gmail.com> > Hi all, > > During Piotr's GSOC addressing customizable serialization I've been > continued to work on my own implementation. > I've now got what feels to me to be a natural conclusion of the design, > which is the 'forms' branch of the > 'django-serializers'<https://github.com/tomchristie/django-serializers/tree/forms>project. > > There's still a few small bits and pieces that need filling in, but it's > pretty much there, > and I believe the project essentially meets the requirements of a more > customizable serialization API. > > I won't go into the full documentation here (refer to the project itself > if you're interested), but in summary it gives you: > > * A declarative serialization API with Serializer/ModelSerializer classes > that mirror the existing Form/ModelForm API. > * A backwards compatible FixtureSerializer class. > * Support for nested relationships, pk relationships, natural key > relationships, and custom relationships such as hyperlinking. > * Validation for deserialization of objects, similar to Form validation. > * Explicitly decouples the structural concerns of serialization from the > encoding/decoding concerns. > * Passing Django's existing fixture serialization tests. > * Fairly trivial to port into Django while keeping backwards compatibility > with existing serialization API. > > What I particularly like about the approach is how it mirrors the existing > Forms API, and I think it'd go a long way to making Django a more useable > framework for authors of Web APIs. As an example, here's what it looks > like when using django-serializers to write API > views<https://gist.github.com/3499147> > . > > At this point what I'm looking for is some feedback: > > * Would it be worth me trying to push towards getting this into core. > * Are there any fundamental issues with the API, or use cases it clearly > doesn't address. > * Any suggested next steps, or things that would need to be > addressed/clarified before it could considered it for core. > > It's probably also worth noting that I'm now planning on using the project > inside my personal project, django-rest-framework, in case that's relevant > to the discussion. > > Thoughts? > > Tom > > -- > 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/-/3ypJSF7nN8oJ. > 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. > -- 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.