          """
          try:
              return (json.load(stream), None)
          except ValueError, exc:
              raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                  {'detail': 'JSON parse error - %s' % unicode(exc)})
  
  
  if yaml:
      class YAMLParser(BaseParser):
          """
 
</s> remove                 raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                    {'detail': 'YAML parse error - %s' % unicode(exc)})
 </s> add                 raise ErrorResponse(
                    content={'detail': 'YAML parse error - %s' % unicode(exc)},
                    status=status.HTTP_400_BAD_REQUEST) </s> remove             raise ErrorResponse(status.HTTP_400_BAD_REQUEST,
                                {'detail': 'multipart parse error - %s' % unicode(exc)})
 </s> add             raise ErrorResponse(
                content={'detail': 'multipart parse error - %s' % unicode(exc)},
                status=status.HTTP_400_BAD_REQUEST) </s> remove         raise ErrorResponse(status.HTTP_405_METHOD_NOT_ALLOWED,
                            {'detail': 'Method \'%s\' not allowed on this resource.' % request.method})
 </s> add         raise ErrorResponse(content=
                {'detail': 'Method \'%s\' not allowed on this resource.' % request.method},
            status=status.HTTP_405_METHOD_NOT_ALLOWED) </s> remove             raise ErrorResponse(status.HTTP_404_NOT_FOUND,
                                {'detail': 'That page contains no results'})
 </s> add             raise ErrorResponse(
                content={'detail': 'That page contains no results'},
                status=status.HTTP_404_NOT_FOUND) </s> remove         except ErrorResponse, exc:
            self.assertEqual(exc.response.raw_content, {'errors': [MockForm.ERROR_TEXT]})
 </s> add         except ErrorResponse, response:
            self.assertEqual(response.raw_content, {'errors': [MockForm.ERROR_TEXT]})
            raise ErrorResponse(
                content={'detail': 'JSON parse error - %s' % unicode(exc)},
                status=status.HTTP_400_BAD_REQUEST)
          """
          try:
              return (json.load(stream), None)
          except ValueError, exc:
            raise ErrorResponse(
                content={'detail': 'JSON parse error - %s' % unicode(exc)},
                status=status.HTTP_400_BAD_REQUEST)
            raise ErrorResponse(
                content={'detail': 'JSON parse error - %s' % unicode(exc)},
                status=status.HTTP_400_BAD_REQUEST)
  
  
  if yaml:
      class YAMLParser(BaseParser):
          """
keep keep keep keep replace replace keep keep keep keep keep
 Response as a subclass of HttpResponse - first draft, not quite there yet. 
djangorestframework/parsers.py