How I built an interactive JSON visualizer in the browser (no react-flow)
Yavuz Özgüven developed jsonbloom.com, a lightweight browser-based tool that visualizes JSON as an interactive graph without relying on heavy libraries like react-flow or d3-hierarchy. The application uses a custom SVG renderer and integrates a CodeMirror editor for editing JSON, with changes synchronized via JSON patches. Built with Astro and React, the tool prioritizes performance by limiting client-side JavaScript and rendering only the interactive parts dynamically.
- ▪jsonbloom.com allows users to paste JSON on one side and view it as an interactive graph on the other.
- ▪The visualizer was built with a custom SVG renderer instead of react-flow or d3-hierarchy to reduce bundle size and complexity.
- ▪The layout algorithm uses a deterministic, one-pass function to position nodes without force simulations or external libraries.
- ▪Changes made in the graph are synchronized back to the CodeMirror editor using JSON patches to preserve cursor position and undo history.
- ▪The site uses Astro for static content and React islands only for interactive components to optimize performance.
Opening excerpt (first ~120 words) tap to expand
try { if(localStorage) { let currentUser = localStorage.getItem('current_user'); if (currentUser) { currentUser = JSON.parse(currentUser); if (currentUser.id === 802685) { document.getElementById('article-show-container').classList.add('current-user-is-article-author'); } } } } catch (e) { console.error(e); } Yavuz Özgüven Posted on May 16 How I built an interactive JSON visualizer in the browser (no react-flow) #astro #javascript #webdev #showdev Every time I debugged a deeply nested API response, I scrolled. I counted brackets. I lost my place. After the third or fourth time of doing this for the same Stripe webhook, I gave up and built a thing: paste JSON in one side, see it as an interactive graph on the other.
…
Excerpt limited to ~120 words for fair-use compliance. The full article is at DEV.to (Top).