Skip to main content

A user-friendly tool to view, analyze, and interact with JSON and JSONL data.

Project description

PySimpleJSONViewer 🚀

PyPI version Build Status License: MIT Python Version

A user-friendly tool to view, analyze, and interact with JSON and JSONL data.

PySimpleJSONViewer provides an intuitive graphical interface built with FreeSimpleGUI to make JSON exploration seamless. It features a side-by-side view for raw JSON input and a structured tree display, along with powerful filtering capabilities using JSONPath.

✨ Key Features

  • Dual Pane Interface:
    • Left Pane: Input single JSON objects or multiple JSON objects in JSONL format (one JSON object per line).
    • Right Pane: Interactive tree view of the parsed JSON, clearly showing keys, values, levels, and hierarchy.
  • JSONL Support:
    • Handles JSONL files or input.
    • Displays the selected JSONL row in the tree view.
    • Efficiently loads large JSONL files (initially showing a subset if very large - feature mentioned in functions.md, implementation details may vary).
  • Interactive Tree View:
    • Expand and collapse nodes to explore complex JSON structures.
    • Clear distinction between keys and values.
  • JSONPath Filtering:
    • Filter the JSON data displayed in the tree view using JSONPath expressions for precise data extraction.
    • Quick help for JSONPath syntax.
  • Pretty Print:
    • Format the JSON in the input pane with a "Pretty JSON" button.
  • Status Bar: Provides feedback on operations and errors.

📸 Screenshots

Placeholder: Add screenshots of your application here! Showcasing the UI, tree view, and filtering in action would be great.

Example:

  • ![Main Interface](link_to_screenshot_main.png)
  • ![JSONPath Filter](link_to_screenshot_filter.png)

🛠️ Installation

  1. Clone the repository (or download the source):

    git clone https://github.com/fxyzbtc/pysimplejsonviewer.git
    cd pysimplejson
    
  2. Ensure you have Python 3.12+ installed.

  3. Install dependencies: The project uses uv for package management (as indicated by uv.lock). If you have uv installed:

    uv pip install -r requirements.txt 
    

    (You might need to generate requirements.txt from pyproject.toml first if it's not present: uv pip freeze > requirements.txt or uv pip compile pyproject.toml -o requirements.txt)

    Alternatively, using pip with pyproject.toml:

    pip install .
    

    This will install pysimplejson and its dependencies:

    • freesimplegui>=5.2.0.post1
    • jsonpath-ng>=1.7.0

🚀 Usage

To run the PySimpleJSONViewer application:

python pysimplejsonviewer/main.py

Once the application starts:

  1. Paste your JSON or JSONL content into the "JSON Input" text area on the left.
  2. The JSON tree view on the right will automatically update.
    • If using JSONL, click on a line in the input (or have a mechanism to select a line) to see it in the tree view.
  3. Use the "JSONPath Filter" input and "Apply Filter" button to query the displayed JSON.
  4. Use "Expand All" / "Collapse All" for the tree view as needed.
  5. Use "Pretty JSON" to format the input in the left pane.

🧩 Dependencies

🤝 Contributing

Contributions are welcome! If you'd like to contribute, please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature-name).
  3. Make your changes.
  4. Commit your changes (git commit -m 'Add some feature').
  5. Push to the branch (git push origin feature/your-feature-name).
  6. Open a Pull Request.

Please make sure to update tests as appropriate.

📜 License

This project is licensed under the MIT License - see the LICENSE.md file for details (assuming you will add one).

Placeholder: Create a LICENSE.md file with the MIT License text, or choose another license.


Generated with ❤️ by an AI assistant and your project details. Remember to replace placeholders like yourusername and add actual screenshots and a license file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysimplejson-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysimplejson-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file pysimplejson-0.1.0.tar.gz.

File metadata

  • Download URL: pysimplejson-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.25

File hashes

Hashes for pysimplejson-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9b1eb919a2602337d96cda27b3001e2df6ae28d1d6543ce33b9043e053afd091
MD5 a706da9ee6c08163448a6d240c53b1d7
BLAKE2b-256 d933e5b86d9ba3e6261e69ead481b6a19070e6a67f7cfe257546b8e3f1428b8b

See more details on using hashes here.

File details

Details for the file pysimplejson-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pysimplejson-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a733f34e2c433704a08e9b2b7c905c9b786cf35b0ff1225efd705a9598ec2627
MD5 0c0e2495612d5c36ff0300054310a31e
BLAKE2b-256 f56493f0a7c81823b1b47b6b7c4afa25df994520162b8f3860f867ff54866f80

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page