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.