Skip to content

Repository files navigation

JSON Viewer

Interactive collapsible JSON/JSONC viewer that opens in your browser. Double-click any .json file to view it as a color-coded, expandable tree.

Features

  • Collapsible tree — click keys to expand/collapse nested objects and arrays
  • JSONC support — handles // and /* */ comments (strips them without touching URLs in strings)
  • Color-coded — keys (blue), strings (amber), numbers (green), booleans (purple), null (gray)
  • Filter/searchCtrl+F to filter keys/values, matches are highlighted
  • Keyboard shortcutsCtrl+E expand all, Ctrl+Shift+C collapse all
  • Copy to clipboard — one-click button to copy the formatted JSON
  • Opens in new browser window — never steals an existing tab

Files

File Purpose
view_json.sh Entry point — parses the input file, generates the HTML viewer, opens browser
_json_viewer_html.py Generates a self-contained HTML page with the interactive tree
_jsonc_format.py Strips JSONC comments while respecting string boundaries
view_json.desktop Desktop entry registered as the default handler for application/json

Installation

From source

git clone git@github.com:hardes11/json-viewer.git
cd json-viewer
make install

One-liner

curl -fsSL https://raw.githubusercontent.com/hardes11/json-viewer/main/install.sh | bash

Uninstall

make uninstall

Files are installed to ~/.local/bin/ and ~/.local/share/applications/. Double-click any .json or .jsonc file afterwards.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages