JSONLoader Documentation Fix (#10505)

- Description: 
Updated JSONLoader usage documentation which was making it unusable
- Issue: JSONLoader if used with the documented arguments was failing on
various JSON documents.
- Dependencies: 
no dependencies
- Twitter handle: @TheSlnArchitect
This commit is contained in:
Maksym Diabin 2023-09-21 21:37:40 +03:00 committed by GitHub
parent e5f420d2bc
commit 697efd9757
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,7 +89,8 @@ Suppose we are interested in extracting the values under the `content` field wit
```python
loader = JSONLoader(
file_path='./example_data/facebook_chat.json',
jq_schema='.messages[].content')
jq_schema='.messages[].content',
text_content=False)
data = loader.load()
```
@ -145,6 +146,7 @@ pprint(Path(file_path).read_text())
loader = JSONLoader(
file_path='./example_data/facebook_chat_messages.jsonl',
jq_schema='.content',
text_content=False,
json_lines=True)
data = loader.load()