Documentation Index
Fetch the complete documentation index at: https://docs.upsonic.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
JSON splitter operates on parsed JSON data, traversing the JSON graph to create chunks that are valid, self-contained JSON objects. Provides path-aware traceability by adding JSON paths to chunk metadata. Falls back to text chunking if JSON parsing fails. Splitter Class:JSONChunker
Config Class: JSONChunkingConfig
Dependencies
No additional dependencies required. Uses standard library.Examples
Parameters
| Parameter | Type | Description | Default | Source |
|---|---|---|---|---|
chunk_size | int | Target size of each chunk | 1024 | Base |
chunk_overlap | int | Overlapping units between chunks | 200 | Base |
min_chunk_size | int | None | Minimum size for a chunk | None | Base |
length_function | Callable[[str], int] | Function to measure text length | len | Base |
strip_whitespace | bool | Strip leading/trailing whitespace | False | Base |
convert_lists_to_dicts | bool | Convert lists to dict-like objects | True | Specific |
max_depth | int | None | Maximum recursion depth | 50 | Specific |
json_encoder_options | dict | Options for json.dumps | Specific |

