Helper class for parsing JSON POST data into a Python object.

def data(self):
        """
        Helper class for parsing JSON POST data into a Python object.
        """
        if self.request.method == 'GET':
            return self.request.GET
        else:
            assert self.request.META['CONTENT_TYPE'].startswith('application/json')
            charset = self.request.encoding or settings.DEFAULT_CHARSET
            return json.loads(self.request.body.decode(charset))