'Parses the incoming bytestream as JSON and returns the resulting data.'

def parse(self, stream, media_type=None, parser_context=None):

    parser_context = (parser_context or {})
    encoding = parser_context.get(u'encoding', settings.DEFAULT_CHARSET)
    try:
        decoded_stream = codecs.getreader(encoding)(stream)
        return json.load(decoded_stream)
    except ValueError as exc:
        raise ParseError((u'JSON    parse    error    -    %s' % six.text_type(exc)))
