On Sat, Aug 14, 2010 at 6:12 PM, Swizec Teller wrote:
> Hi all,
>
> brand new django contributor here, been using it so much I reckon it's
> about time I started giving back :)
>
> Anyhow, I'm using Django primarily to develop RESTful API's for web
> services. This of course means a lot of JSON is getting passed around
> in GET/POST requests so I wrote a simple form field JSONField that
> handles json validation and deserialisation because it was getting
> annoying having to do it by hand all the time.
>
> My question is: Is this something that would be useful to upstream?
My immediate reaction is no, because I can't say I've come across many
REST APIs that use JSON submitted in POST data in form-encoded format
(which I presume is the use case here). When I see REST APIs using
JSON, the POST is usually encoded application/json, and the whole
packet is JSON; any 'field-based' logic is handled by top-level keys
in the JSON. Django-piston is an example of a framework that does this
sort of processing.
I would suggest that this may be better suited to a utility library;
if it turns out this utility library gets lots of use, we can consider
it for inclusion in trunk.
> Oh and I also wrote a decorator for validating forms, makes for
> cleaner code than how current examples in the documentation handle
> that. Should I contribute that too?
We're open to any suggestions, but we need to see what's being proposed.
Yours,
Russ Magee %-)
--
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to django-develop...@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.