"""High-level bindings for the simdjson project."""importjsontry:fromcsimdjsonimport(Parser,Array,Object,MAXSIZE_BYTES,PADDING)exceptImportError:raiseRuntimeError('Unable to import low-level simdjson bindings.')_ALL_IMPORTS=[Parser,Array,Object,MAXSIZE_BYTES,PADDING]
[docs]defload(fp,*,cls=None,object_hook=None,parse_float=None,parse_int=None,parse_constant=None,object_pairs_hook=None,**kwargs):""" Parse the JSON document in the file-like object fp and return the parsed object. All other arguments are ignored, and are provided only for compatibility with the built-in json module. """parser=Parser()returnparser.parse(fp.read(),True)
[docs]defloads(s,*,cls=None,object_hook=None,parse_float=None,parse_int=None,parse_constant=None,object_pairs_hook=None,**kwargs):""" Parse the JSON document s and return the parsed object. All other arguments are ignored, and are provided only for compatibility with the built-in json module. """parser=Parser()returnparser.parse(s,True)