def parse(self, data): try: return ujson.loads(data) except ValueError as exc: raise ParseError('JSON parse error - %s' % six.text_type(exc))