惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Y
Y Combinator Blog
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
Google DeepMind News
Google DeepMind News
aimingoo的专栏
aimingoo的专栏
Recent Announcements
Recent Announcements
A
About on SuperTechFans
U
Unit 42
MyScale Blog
MyScale Blog
J
Java Code Geeks
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
D
Docker
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 司徒正美
量子位
月光博客
月光博客
G
Google Developers Blog
V
V2EX
博客园 - 聂微东
宝玉的分享
宝玉的分享
IT之家
IT之家
Vercel News
Vercel News

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I built a privacy-first JSON viewer for Chrome after I go...
Connor LeeBo · 2026-06-08 · via DEV Community

A few months ago, like many devs, I noticed something off about the JSON viewer extension I'd been using for years.

It had been quietly updated. The code went closed-source. Donation popups started appearing on unrelated pages including, in some reports, users' checkout pages. The maintainer had moved on, and the new owners had different priorities than "view JSON."

I uninstalled it. Then I went looking for an alternative.

The replacement options I found had their own problems. Some required <all_urls> permissions to do something that should only need access to the current tab. Some hadn't been updated in three years and choked on any JSON file over 5MB. Some quietly phoned home for "telemetry."

So I built my own. It took longer than I expected. Here's what I learned.

The trust pitch had to be the architecture

I didn't want "trust me, bro" privacy. I wanted privacy you could verify by reading the manifest.

The whole product reduces to three permissions:

  • activeTab — only when the user explicitly clicks the toolbar icon
  • scripting — to inject the viewer into the current tab
  • storage — to remember the user's light/dark theme preference (and only that)

That's it. No <all_urls>, no tabs, no cookies, no webRequest, no background page watching anything. The extension literally cannot read pages you don't gesture on, because Chrome's permission model won't let it.

I also vendored every dependency. The only third-party code is js-yaml (MIT licensed, unmodified, copied into /vendor). There are zero CDN imports, zero eval(), zero new Function(), zero remote scripts. What you install is exactly what runs. You can verify this with grep -r "fetch\|XMLHttpRequest" . and find nothing.

Real-world files broke everything

Most JSON viewer extensions render the tree with synchronous DOM manipulation. Drop a 10MB JSON file in and the tab freezes for 30+ seconds. The user thinks the browser crashed.

I tested this with a synthetic 10MB file containing 17,000 records. The first version of my viewer froze the tab for 22 seconds. Unacceptable.

The fix was lazy rendering. Top-level structure renders immediately with collapsed children. Subtrees only render when the user expands a node. A small progress bar shows the parsing/initial-render percentage so the user knows the extension is alive.

This took two rewrites of the rendering code to get right. The trick was treating the JSON not as a tree to render, but as a tree to navigate. You don't need to draw 17,000 records up front — you need to be ready to draw any one of them on click.

YAML and XML support, for real workflows

If you've ever debugged a Kubernetes config, you know that scrolling through 400 lines of indented YAML is a special kind of pain.

I added YAML support next, parsed with js-yaml. Now Kubernetes manifests, GitHub Actions workflows, Docker Compose files — anything served as text/yaml — renders as a collapsible tree.

XML came after that, using the browser's native DOMParser. It works on local XML files via Chrome's built-in file viewer too — that was a fun rabbit hole I had to dive into.

The do-no-harm rule

One thing I hated about the old JSON viewers: if they couldn't parse a page, sometimes they'd still try to transform it, and you'd end up with a destroyed view of whatever was actually there.

My rule: if the content isn't valid JSON, YAML, XML, or JSONP, the extension does nothing. A small toast tells the user why, and the original Chrome rendering of the page is preserved exactly. No blank screens. No destroyed content.

Lessons for any indie extension developer

Three things I'd tell my past self:

1. Permissions are your trust pitch. Users who care about privacy will read your manifest. Asking for less is worth more than any marketing copy.

2. Test with real-world data, not toy examples. A 50-line sample JSON file tells you nothing about whether your extension survives a real API response.

3. Open-source the whole thing, MIT licensed, with no build step. Auditability is a feature. Make it possible to verify your claims by reading the code, not by trusting a privacy policy.

The extension

It's called JSON Viewer · Open Source · No Tracking.

If you've been waiting for a clean replacement, this is the one. If you've already found one, I'd love to hear which.