Skip to content

hrhrng/super-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

102 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Super JSON Editor

Super JSON Editor Version License

The Ultimate Multi-Layer Escaped JSON Editor - Parse, Edit, and Rebuild Complex Nested JSON with Ease! ๐ŸŽฏ

Try It Now | Documentation

Report Bug | Request Feature


โœจ What Makes It Super?

Ever struggled with deeply nested, escaped JSON strings? Like this nightmare:

{
  "config": "{\"settings\":{\"theme\":\"dark\",\"nested\":\"{\\\"level3\\\":{\\\"deep\\\":\\\"{\\\\\\\"level4\\\\\\\":\\\\\\\"final\\\\\\\"}\\\"}}\"}}"
}

Super JSON Editor transforms it into beautiful, editable layers! ๐ŸŽจ

Super JSON Editor Interface

Clean and intuitive interface with multi-layer JSON parsing

๐Ÿ“ธ See It In Action

Multi-layer JSON Editing

Navigate through complex nested JSON layers with ease

๐Ÿ”ฅ Features

๐ŸŽฏ Four Powerful Modes

๐Ÿ” LAYER Mode - Multi-Layer JSON Editor

  • Smart Analysis - Automatically detects and parses up to 10 layers of escaped JSON
  • Interactive Breadcrumb - Navigate through JSON layers with visual hierarchy
  • Bidirectional Sync - Changes in any layer automatically sync across parent/child layers
  • Real-time Validation - Instant JSON validation with error notifications
  • Multi-Document Tabs - Work on multiple JSON documents simultaneously

๐Ÿ”ง TOOLS Mode - JSON Processor

  • Format & Minify - Beautiful formatting or compact minification (with best-effort fallback for invalid JSON)
  • Escape & Unescape - Handle escaped JSON strings with ease
  • Base64 Encode/Decode - Convert JSON to/from Base64
  • URL Encode/Decode - Make JSON URL-safe
  • Sort Keys - Alphabetically sort all object keys
  • Case Conversion - camelCase โ†” snake_case key conversion
  • Apply to Input - Instantly apply processed output back to input

๐Ÿฆธ HERO Mode - Visual JSON Explorer

  • JSON Hero Integration - Visualize JSON structure with JSON Hero
  • Interactive Preview - Explore your JSON in a beautiful interface
  • Share & Collaborate - Generate shareable links for your JSON
  • Open in New Tab - Full JSON Hero experience in a new window

๐Ÿ“Š DIFF Mode - JSON Comparison

  • Side-by-Side Diff - Compare two JSON documents with Monaco DiffEditor
  • Document Selector - Pick any open document to compare against
  • Toggle Unchanged - Show or hide unchanged regions

๐Ÿ”— Share & Import

Share JSON instantly via URL โ€” no server required:

  • Share Button - One-click share with gzip compression (?c= parameter)
  • Custom Tab Names - Hover "Share" to name your tab before sharing (?t= parameter)
  • Hero Direct Link - Add ?h=1 to auto-open JSON Hero viewer on import

๐Ÿค– Claude Code Skill: present-json

The skills/present-json/ directory contains a first-class Claude Code skill that lets AI agents present JSON results to humans via interactive browser links.

Install via skills.sh:

npx skills add hrhrng/super-json

How it works โ€” agent generates a shareable link from any JSON:

# Agent generates a compressed shareable link from any JSON
encoded=$(echo -n '{"status":"ok","data":[1,2,3]}' | gzip -9 | base64 | tr '+/' '-_' | tr -d '=\n')
echo "https://hrhrng.github.io/super-json?c=${encoded}&t=API+Response"

# With Hero mode for interactive visualization
echo "https://hrhrng.github.io/super-json?c=${encoded}&t=API+Response&h=1"

URL Parameters:

Param Description Example
c Gzip + Base64url compressed JSON ?c=H4sIA...
t Custom tab name &t=My+Results
h Auto-switch to Hero mode &h=1

๐ŸŽฎ Quick Start

Online Version (Recommended)

Just open https://hrhrng.github.io/super-json - No installation needed! ๐ŸŽ‰

Local Setup

# Clone the repository
git clone https://github.com/hrhrng/super-json.git

# Navigate to the directory
cd super-json

# Install dependencies
npm install

# Start development server
npm run dev
# then visit http://localhost:3000/super-json/

# Or build for production
npm run build
npm run preview

๐ŸŽฏ Use Cases

Perfect for:

  • ๐Ÿ”ง API Development - Debug complex API responses
  • ๐Ÿ—„๏ธ Database Management - Edit JSON columns with nested data
  • ๐Ÿ“Š Data Processing - Clean and transform multi-layer JSON
  • ๐Ÿ” Debugging - Understand complex JSON structures
  • ๐Ÿ“ Configuration Files - Manage nested config files
  • ๐Ÿค– AI Agent Output - Agents share JSON results via present-json skill for human review

๐Ÿ—๏ธ How It Works

LAYER Mode Workflow

graph LR
    A[Input JSON] --> B[Parse Button]
    B --> C[Layer Detection]
    C --> D[Interactive Breadcrumb]
    D --> E[Edit Any Layer]
    E --> F[Auto-Sync All Layers]
    F --> G[Apply Button]
    G --> A
Loading
  1. Paste your nested/escaped JSON into the input panel
  2. Click "Parse" to analyze and detect all layers
  3. Navigate through layers using the interactive breadcrumb
  4. Edit any layer - changes auto-sync to related layers
  5. Click "Apply" to update the input with your changes

TOOLS Mode Workflow

  1. Input your JSON in the left panel
  2. Select any processing tool (Format, Escape, Base64, etc.)
  3. View the processed result in the output panel
  4. Apply the result back to input if needed

HERO Mode Workflow

  1. Input your JSON data
  2. Load into the embedded JSON Hero viewer
  3. Explore your data structure visually
  4. Open in new tab for full experience

๐Ÿ› ๏ธ Tech Stack

  • React 18 - Modern reactive UI framework
  • TypeScript - Type-safe development with strict mode
  • Monaco Editor - VS Code's powerful editor in your browser
  • Zustand - Lightweight state management with Immer middleware
  • Vite - Lightning-fast build tool
  • LZ-String - URL-safe JSON compression for sharing
  • Playwright - E2E snapshot testing
  • Vitest - Unit testing
  • LocalStorage API - Persistent storage without servers
  • JSON Hero API - Visual JSON exploration
  • GitHub Actions - CI/CD with preview deployments

๐Ÿ“ Project Structure

super-json/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ Layout/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ MainLayout.tsx          # Core layout with mode routing
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ components/             # DocumentTabs, ViewModeButtons
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ modes/                  # LayerMode, ProcessorMode, HeroMode, DiffMode
โ”‚   โ”‚   โ”œโ”€โ”€ Breadcrumb/                 # Layer navigation breadcrumb
โ”‚   โ”‚   โ”œโ”€โ”€ Notification/               # Toast notification system
โ”‚   โ”‚   โ””โ”€โ”€ ShareButton/                # Share link generator with dropdown
โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”œโ”€โ”€ useKeyboardShortcuts.ts     # Ctrl+Enter, Ctrl+S, Ctrl+T, etc.
โ”‚   โ”‚   โ””โ”€โ”€ useSimpleImport.ts          # URL parameter import (s, r, t, h)
โ”‚   โ”œโ”€โ”€ stores/
โ”‚   โ”‚   โ”œโ”€โ”€ documentStore.ts            # Document state (Zustand + Immer)
โ”‚   โ”‚   โ””โ”€โ”€ appStore.ts                 # App settings state
โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ”‚   โ”œโ”€โ”€ jsonAnalyzer.ts             # Core layer detection engine
โ”‚   โ”‚   โ”œโ”€โ”€ jsonFormatter.ts            # Format/minify with best-effort fallback
โ”‚   โ”‚   โ”œโ”€โ”€ jsonDiff.ts                 # Deep diff comparison
โ”‚   โ”‚   โ”œโ”€โ”€ simpleShare.ts              # URL sharing (LZ-String + base64url)
โ”‚   โ”‚   โ””โ”€โ”€ monacoTheme.ts             # Custom neon dark theme
โ”‚   โ””โ”€โ”€ types/index.ts                  # TypeScript interfaces
โ”œโ”€โ”€ skills/
โ”‚   โ””โ”€โ”€ present-json/SKILL.md           # Claude Code skill for agent โ†’ human JSON sharing
โ”œโ”€โ”€ tests/                              # Playwright E2E tests
โ”œโ”€โ”€ .github/workflows/                  # CI, deploy, preview cleanup
โ””โ”€โ”€ index.html                          # Entry point (preview branch title detection)

โŒจ๏ธ Keyboard Shortcuts

Shortcut Action
Ctrl+Enter Analyze/Parse JSON
Ctrl+S Generate Output
Ctrl+T New Document
Ctrl+W Close Current Document
Ctrl+Tab Switch to Next Document

๐ŸŒŸ Key Features

  • โœ… Multi-layer JSON parsing - Handle up to 10 layers of nested escaped JSON
  • โœ… Four specialized modes - Layer editing, processing tools, visual exploration, diff comparison
  • โœ… Multi-document support - Work with multiple JSONs simultaneously
  • โœ… Shareable links - Compress and share JSON via URL (LZ-String or base64url)
  • โœ… Claude Code skill - AI agents can present JSON to humans interactively
  • โœ… Auto-save - Never lose your work (localStorage persistence)
  • โœ… Real-time validation - Instant error feedback
  • โœ… Bidirectional sync - Smart parent-child layer synchronization
  • โœ… JSON processing tools - Format, minify, escape, encode, sort, case-convert
  • โœ… JSON Hero integration - Beautiful interactive visualization
  • โœ… Preview deployments - Branch preview URLs with title indicator
  • โœ… Modern dark theme - Neon-styled interface with custom Monaco theme
  • โœ… Responsive design - Works on all devices

๐Ÿค Contributing

Contributions are what make the open source community amazing! Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Preview deployments are automatically created for each branch at: https://hrhrng.github.io/super-json/preview/<branch-name>/

๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.

๐Ÿ™ Acknowledgments

  • Monaco Editor by Microsoft
  • JSON Hero for interactive JSON visualization
  • LZ-String for URL-safe compression
  • Inspired by the pain of debugging nested JSON
  • Built with โค๏ธ for developers by developers

๐ŸŒŸ Star us on GitHub!

If this tool saved you time, please consider giving it a star! โญ

Star This Repo

Made with โค๏ธ by developers who hate escaped JSON as much as you do!

About

Most powerful online JSON Editor. All data keep in your browser. No Ads.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors