[PATCHSET] Add support for json.

75 views
Skip to first unread message

Dylan Smith

unread,
Apr 21, 2012, 10:24:30 PM4/21/12
to pyactiveresource
The simplejson package is needed to get it to work with python 2.5.  Later versions of python include the json module.  Without these modules XML support will continue to work, and it remains the default format.

I tried to keep the implementation consistent with the ruby ActiveResource, even though I find it strange that self.klass.format.encode isn't used by ActiveResource.encode.
0001-Implement-ActiveResource.encode-to-avoid-using-to_xm.patch
0002-Consistently-use-format-rather-than-_format-in-Activ.patch
0003-Add-JSON-support.patch

Dylan Smith

unread,
Apr 22, 2012, 1:53:35 PM4/22/12
to pyactiveresource
The attached patch implements the parsing of JSON error responses which was missing in the original patchset.
0004-Handle-errors-for-json-format.patch

Dylan Smith

unread,
May 20, 2012, 2:56:48 AM5/20/12
to pyactiveresource
Any feedback for this patchset?

Luke Petre

unread,
Jan 7, 2013, 7:38:33 AM1/7/13
to pyactive...@googlegroups.com
+1 on this patch set. Any chance this can get integrated, please?

On Sunday, May 20, 2012 7:56:48 AM UTC+1, Dylan Smith wrote:
Any feedback for this patchset?
Reply all
Reply to author
Forward
0 new messages