Skip to main content

An interactive JSON viewer for Jupyter Notebooks

Project description

Jupyter JSON Viewer v1.4

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.4.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.4-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jupyter_json_viewer-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 ac23ac7bb6804c5163d95f80f46e7dcfabb69b67572f6d1cabcd5061945b27ef
MD5 e0149c41ec15fbcab787f36278d848b0
BLAKE2b-256 9366860d3ec8051a858d9de132b193eccbf1b1ce0f0e5c0b74d3df7f09f143d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jupyter_json_viewer-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 43b410d66efea551f4512f1c27ec307792ad0f9e460e94b4a4a20c11a8b552f6
MD5 71abfa5b0b28d62f97d524b9287ab661
BLAKE2b-256 5ecb81d4158a7e7caac93b942f9e53b82570d47be17db11de33488ca40e3a274

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