I am trying to load a folder of JSON files in Langchain as:
loader = DirectoryLoader(r'C:...')
documents = loader.load()
But I got such an error message:
ValueError: Json schema does not match the Unstructured schema
Can anyone tell me how to solve this problem?
I tried using glob='**/*.json', but it is not working. The documentation on the Langchain website is limited as well.
If you want to read the whole file, you can use
loader_clsparams:also, you can use
JSONLoaderwith schema params like:jq_schemaYou can follow this: https://github.com/hwchase17/langchain/blob/master/langchain/document_loaders/json_loader.py#L10more usage for
DirectoryLoader: https://github.com/hwchase17/langchain/blob/master/langchain/document_loaders/directory.py