mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-29 18:08:36 +00:00
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:
parent
e5f420d2bc
commit
697efd9757
@ -89,7 +89,8 @@ Suppose we are interested in extracting the values under the `content` field wit
|
|||||||
```python
|
```python
|
||||||
loader = JSONLoader(
|
loader = JSONLoader(
|
||||||
file_path='./example_data/facebook_chat.json',
|
file_path='./example_data/facebook_chat.json',
|
||||||
jq_schema='.messages[].content')
|
jq_schema='.messages[].content',
|
||||||
|
text_content=False)
|
||||||
|
|
||||||
data = loader.load()
|
data = loader.load()
|
||||||
```
|
```
|
||||||
@ -145,6 +146,7 @@ pprint(Path(file_path).read_text())
|
|||||||
loader = JSONLoader(
|
loader = JSONLoader(
|
||||||
file_path='./example_data/facebook_chat_messages.jsonl',
|
file_path='./example_data/facebook_chat_messages.jsonl',
|
||||||
jq_schema='.content',
|
jq_schema='.content',
|
||||||
|
text_content=False,
|
||||||
json_lines=True)
|
json_lines=True)
|
||||||
|
|
||||||
data = loader.load()
|
data = loader.load()
|
||||||
|
Loading…
Reference in New Issue
Block a user