Skip to main content

An interactive JSON viewer for Jupyter Notebooks

Project description

Jupyter JSON Viewer v1.5

An Interactive JSON Visualization System for Jupyter Notebooks

╔══════════════════════════════════════════════════════════════╗
║ JUPYTER JSON VIEWER v1.5                                     ║
║ >_INTERACTIVE JSON VISUALIZATION SYSTEM                      ║
║ >>DOCUMENTATION INITIALIZED                                  ║
╚══════════════════════════════════════════════════════════════╝

Overview

Jupyter JSON Viewer is a ligh-weight visualization tool designed to make JSON data exploration in Jupyter Notebooks more intuitive and efficient. It transforms complex JSON structures into interactive, collapsible displays with intelligent visual hierarchy and customizable themes.

Key Features

>_CORE CAPABILITIES
------------------
[■] VISUAL HIERARCHY
    > Tree-style markers (┐├┘) showing data relationships
    > Color-coded data types for quick recognition
    > Clear indentation for nested structures
    > Collapsible sections for managing complexity

[■] INTERACTIVE ELEMENTS
    > Click-to-expand/collapse functionality
    > Intuitive arrow indicators (▼/▶)
    > Responsive hover effects
    > Smooth transitions

[■] THEME SUPPORT
    > Professional light and dark modes
    > Carefully chosen color palettes
    > Optimized for readability
    > Reduced eye strain for long sessions

Installation

pip install jupyter-json-viewer

Quick Start

from jupyter_json_viewer import display_json

# Your JSON-compatible data
data = {
    "name": "example",
    "details": {
        "type": "demo",
        "values": [1, 2, 3],
        "active": True
    }
}

# Basic usage
display_json(data)

# Advanced configuration
display_json(
    data,
    title="Data Structure",    # Optional heading
    dark_mode=True,           # Enable dark theme
    collapsed=True,           # Start collapsed
    max_depth=3,             # Maximum nesting display
    indent_size=24           # Spacing size in pixels
)

Configuration Options

>_PARAMETERS
-----------
[DATA]       Any JSON-compatible Python object (required)
[TITLE]      Optional string for display heading
[MAX_DEPTH]  Integer limiting nesting visualization
[COLLAPSED]  Boolean for initial collapse state
[INDENT]     Integer for visual spacing (pixels)
[DARK_MODE]  Boolean for theme selection

Theme Specifications

>_COLOR SCHEMES
-------------
LIGHT THEME                 DARK THEME
Background: #f8f9fa         Background: #1e1e1e
Text:       #2c3e50         Text:       #d4d4d4
Strings:    #28a745         Strings:    #6A9955
Numbers:    #0066cc         Numbers:    #569CD6
Booleans:   #e83e8c         Booleans:   #C586C0
Keys:       #2c3e50         Keys:       #4EC9B0

Visual Structure Guide

The viewer creates a clear visual hierarchy:

>_STRUCTURE
---------
┐ Root level elements
├ Middle elements with siblings
└ Last elements in their level
  └ Nested structures
    └ Further nesting

Technical Requirements

>_PREREQUISITES
------------
- Python 3.6+
- IPython 7.0.0+
- Jupyter Notebook/Lab

Security Features

The viewer implements several security measures:

  • HTML escaping for title text
  • UUID-based element isolation
  • Proper error handling and reporting
  • Type-safe data processing

Error Handling

The viewer provides clear error messages for common issues:

  • Invalid JSON structures
  • Unsupported data types
  • Malformed input data
  • Display rendering problems

License

╔════════════════════════════════════════════════╗
║ GNU General Public License v3.0                ║
║ Copyright (c) 2024                             ║
║ Developed by Johannes Kaindl                   ║
╚════════════════════════════════════════════════╝

Contributing

Contributions are welcome! Please feel free to submit pull requests or create issues for bugs and feature requests.

To set up the development environment:

# Clone the repository
git clone https://github.com/v6t2b9/jupyter-json-viewer
cd jupyter-json-viewer

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

Support

For questions and support:

  1. Check the issues page
  2. Review existing questions
  3. Create a new issue if needed

The viewer works best with modern browsers and updated Jupyter environments. For optimal performance, keep your Python packages up to date.

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

jupyter_json_viewer-0.1.5.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

jupyter_json_viewer-0.1.5-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file jupyter_json_viewer-0.1.5.tar.gz.

File metadata

  • Download URL: jupyter_json_viewer-0.1.5.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.15

File hashes

Hashes for jupyter_json_viewer-0.1.5.tar.gz
Algorithm Hash digest
SHA256 0fbe2e7f28d133683b32b41027e188d10b1eb22d82a4e63b1f2416f8e2650b57
MD5 15608af673ccc838f2a146d0b68567b5
BLAKE2b-256 74abdee7c909d7f9fda07ff01635dde940ee36ca06f3c1dfa670084aadad681d

See more details on using hashes here.

File details

Details for the file jupyter_json_viewer-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyter_json_viewer-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 8c9bd4b41a88b7848c5aa1c8484458597a241ef266eda2b2060917c46d4dc724
MD5 c245ad06f3223e19200f2a97f5718f6e
BLAKE2b-256 a784a800b08a29d9df5250880b41c76c357b2205b0c15c1046be22a5204c870d

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