Skip to main content

An interactive JSON viewer for Jupyter Notebooks

Project description

Jupyter JSON Viewer v1.0

An Interactive JSON Visualization System for Jupyter Notebooks

╔══════════════════════════════════════════════════════════════╗
║ JUPYTER JSON VIEWER v1.0                                     ║
║ >_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.3.tar.gz (7.0 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.3-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jupyter_json_viewer-0.1.3.tar.gz
  • Upload date:
  • Size: 7.0 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.3.tar.gz
Algorithm Hash digest
SHA256 9e42dc059e94113f8ab948aaad1012ba750819a8a7da69821e667984210dbe19
MD5 fff63567602a01d71cb213e3427973fb
BLAKE2b-256 4f0935a856a5075a2f21ad16cdf9b70824d74ed6ea0a1526d5725966bdfa439c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jupyter_json_viewer-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0dff2edeb630cdb064d66a2f10d3cf6178aa46745fe5df1f7a671ca8b0546178
MD5 64b6d68c9319332638a4a9251ec9a682
BLAKE2b-256 abda7d1a0076ca6f276822b3ab36338309a83ba5c1f16ea8724ffe36136d1e6d

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