jsonltui
jsonltui is a fast TUI application (with optional slow webui) to visually navigate and inspect JSON and JSONL data. Easily localize parse errors in large JSONL files. Made with LLM fine-tuning workflows in mind.
With JSONL error handling:
With modal view for large strings:
Installation
pip install jsonltui
Features
- Interactive tree view of JSON and JSONL data in both TUI and Web UI
- Supports both single JSON objects and JSONL (multiple JSON objects, one per line)
- Graceful handling of parsing errors, displaying them inline with successfully parsed data
- Expandable error nodes showing original unparsable text and error messages
- Truncation of long text values with the ability to view full text in a modal
- Keyboard navigation for easy exploration of the JSON structure in TUI mode
- Web-based interface for a more familiar and accessible visualization
Usage
You can use jsonltui in three ways:
-
With a JSON or JSONL file using the TUI:
jsonltui path/to/your/file.json -
With piped input using the TUI:
cat path/to/your/file.json | jsonltui -
With the Web UI option:
jsonltui --webui path/to/your/file.jsonor
cat path/to/your/file.json | jsonltui --webui
TUI Keyboard Controls
- Arrow keys: Navigate the tree
- Enter: Expand/collapse nodes or view full text of truncated values
- 'q' or Ctrl+C: Quit the application
- 'b' or Escape: Go back from full text view to main tree view
Web UI
The Web UI provides a familiar interface with collapsible tree nodes and expandable long text values. It opens in your default web browser, allowing for easy navigation and exploration of your JSON/JSONL data.
Error Handling
When jsonltui encounters a parsing error in a JSONL file, it will:
- Display the error in red at the appropriate position in the tree.
- Show the line number where the error occurred.
- Allow you to expand the error node to see:
- The original unparsable text
- The specific error message
This allows you to inspect and debug issues in your JSON data easily.
Installation (development)
-
Ensure you have Python 3.7 or higher installed on your system.
-
Clone this repository:
git clone https://github.com/gr-b/jsonltui.git cd jsonltui -
Install locally
pip install -e .
Limitations
- The application loads the entire JSON/JSONL file into memory, so it may not be suitable for extremely large files.
- Syntax highlighting is not provided for the JSON structure in the TUI to maintain simplicity and performance.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for jsonltui 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jsonltui-0.1.0.tar.gz | 6.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jsonltui-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.1 kB
Release files / jsonltui-0.1.0.tar.gz
| Download URL | jsonltui-0.1.0.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ff1473222fb87c38ba7eff3e29eb523e5c10cb050eeed3d8a683ba6f7728270
|
|
BLAKE2b-256 checksum How to use checksums |
da6a3cd5b1f1a8bd6175d11756395f2e54e01dbc08aca72dd359db8ae66d469e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.5
|
Release files / jsonltui-0.1.0-py3-none-any.whl
| Download URL | jsonltui-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ce2aa4753c10edcdf7eeacf8249eacb1a392015c129d47714b4b48f5e06009a7
|
|
BLAKE2b-256 checksum How to use checksums |
73302d20dec4c08b0077913a8c91c5fcd98b88eb5f2b5d4cad64608de9095b2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.5
|