From 697efd9757609699257286d4b429ee6266e35ea4 Mon Sep 17 00:00:00 2001 From: Maksym Diabin Date: Thu, 21 Sep 2023 21:37:40 +0300 Subject: [PATCH] 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 --- .../modules/data_connection/document_loaders/how_to/json.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/snippets/modules/data_connection/document_loaders/how_to/json.mdx b/docs/snippets/modules/data_connection/document_loaders/how_to/json.mdx index 7b56867047b8c..13fdf9c602f93 100644 --- a/docs/snippets/modules/data_connection/document_loaders/how_to/json.mdx +++ b/docs/snippets/modules/data_connection/document_loaders/how_to/json.mdx @@ -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()