<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Toolonium Notes]]></title><description><![CDATA[Small, fast, client-side web tools and the thinking behind them. Notes on building utilities that do one thing well and respect your data — no uploads, no signu]]></description><link>https://toolonium.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 12 Nov 2026 08:58:15 GMT</lastBuildDate><atom:link href="https://toolonium.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The JSON depth number that tells you your config is a mess]]></title><description><![CDATA[A quick case for client-side formatting — and the one stat most formatters hide]]></description><link>https://toolonium.hashnode.dev/the-json-depth-number-that-tells-you-your-config-is-a-mess</link><guid isPermaLink="true">https://toolonium.hashnode.dev/the-json-depth-number-that-tells-you-your-config-is-a-mess</guid><category><![CDATA[json]]></category><category><![CDATA[webdev]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[devtools]]></category><dc:creator><![CDATA[Pablo Infante]]></dc:creator><pubDate>Thu, 05 Nov 2026 16:50:18 GMT</pubDate><content:encoded><![CDATA[<p>Most JSON formatters answer one question: "can you make this readable?" You paste a minified blob, hit format, and get indentation. Useful, but shallow. There's a second question that actually saves you from bugs, and almost no one asks it: <strong>how deep is this thing?</strong></p>
<p>I'll get to the depth stat in a second. First, the part nobody signs off on.</p>
<h2>The upload you didn't agree to</h2>
<p>A lot of web-based formatters POST your JSON to a server to "process" it. For a toy object, who cares. But the JSON you actually need to format is rarely a toy — it's a production API response with access tokens, customer emails, internal IDs, the stuff you'd never paste into a random third party on purpose. Formatting is pure string work: parse, indent, re-serialize. <strong>There is no technical reason for that text to leave your machine.</strong></p>
<p>So my rule is simple: if a tool only transforms text, it transforms it in my browser or I don't use it. For JSON I reach for <a href="https://toolonium.com/en/tools/json-formatter/">Toolonium's JSON formatter</a> — everything runs client-side, nothing is uploaded, no account.</p>
<h2>The stats that turn formatting into inspection</h2>
<p>Beyond pretty-printing, the formatter reports three numbers, and the third is the one I actually watch:</p>
<ul>
<li><strong>Size in bytes</strong> — a fast sanity check. "Why is this response 2 MB?" is a good question to ask before it hits a mobile client.</li>
<li><strong>Key count</strong> — how many keys at the top level. Handy for spotting a payload that quietly grew.</li>
<li><strong>Nesting depth</strong> — how many levels deep the structure goes. <strong>This is the sleeper.</strong> You think you have a flat config; the tool says depth 7. That depth is a map of accidental complexity — a <code>settings.features.flags.experimental.rollout.v2.enabled</code> that nobody meant to create.</li>
</ul>
<p>A flat, intentional object sits at depth 2–3. When the number climbs past that without a reason, it's usually a sign the shape drifted over time and no one refactored it.</p>
<h2>A couple of things it does well</h2>
<ul>
<li><strong>Indent control:</strong> 2 spaces, 4 spaces, tab — or <strong>minify</strong> to go the other way and compact a blob back down.</li>
<li><strong>Sort keys:</strong> alphabetize object keys. This one's underrated for diffing: two API responses that return the same fields in different orders look like a huge diff until you sort both and see they're identical.</li>
</ul>
<h2>When a browser tool beats your editor</h2>
<p>Your editor's formatter is perfect <em>inside a file</em>. But half the time I'm formatting something that isn't a file yet: a response pasted straight from <code>curl</code>, a webhook body I'm reading in a meeting, a log line someone dropped in chat. No project, no extension, no file to save — just read it and close the tab. And because it's client-side, I don't think twice about pasting the real payload instead of a sanitized one.</p>
<h2>Takeaway</h2>
<p>Formatting JSON isn't just about indentation — glance at the <strong>depth</strong> and you'll catch structures that grew past what you intended. And prefer a formatter that transforms locally: there's no good reason a production response should be uploaded to read it. If you want a zero-upload one, <a href="https://toolonium.com/en/tools/json-formatter/">it's here</a> — free, nothing to install.</p>
<p><em>What's the deepest "flat config" you've ever found by accident? I'm collecting horror stories.</em></p>
]]></content:encoded></item></channel></rss>