

def load(self, bytes, base_url=None):
    '\n        Takes a bytestring and returns a document.\n        '
    try:
        data = json.loads(bytes.decode('utf-8'))
    except ValueError as exc:
        raise ParseError(('Malformed JSON. %s' % exc))
    doc = _primative_to_document(bytes, base_url)
    if isinstance(doc, Object):
        doc = Document(content=dict(doc))
    elif (not (isinstance(doc, Document) or isinstance(doc, Error))):
        raise ParseError('Top level node should be a document or error.')
    return doc

dataset/ETHPy150Open core-api/python-client/coreapi/codecs/corejson.py CoreJSONCodec.load/VarMisuse@59/102 `data`->`bytes`