<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tommy</title>
    <description>The latest articles on DEV Community by Tommy (@tommy_art).</description>
    <link>https://dev.to/tommy_art</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3893356%2F201566df-5426-4804-8ad9-ee921f371d2c.png</url>
      <title>DEV Community: Tommy</title>
      <link>https://dev.to/tommy_art</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tommy_art"/>
    <language>en</language>
    <item>
      <title>Why I built yet another JSON formatter (and what I did differently)</title>
      <dc:creator>Tommy</dc:creator>
      <pubDate>Thu, 23 Apr 2026 03:35:59 +0000</pubDate>
      <link>https://dev.to/tommy_art/why-i-built-yet-another-json-formatter-and-what-i-did-differently-4am3</link>
      <guid>https://dev.to/tommy_art/why-i-built-yet-another-json-formatter-and-what-i-did-differently-4am3</guid>
      <description>&lt;p&gt;I've been pasting JSON into random online tools for years. Formatter, type generator, diff —&lt;br&gt;
you name it, there's already 10 versions of it online.&lt;/p&gt;

&lt;p&gt;So why build another one?&lt;/p&gt;

&lt;p&gt;One day I was debugging a prod API response and copy-pasted the payload into the first&lt;br&gt;
JSON formatter that came up in Google. Then I looked at the network tab.&lt;/p&gt;

&lt;p&gt;It had sent my data to a server.&lt;/p&gt;

&lt;p&gt;Not a big deal in isolation, but it got me thinking: how many times have I done this&lt;br&gt;
without checking? How many times has someone on my team done it?&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://jsonic.io" rel="noopener noreferrer"&gt;Jsonic&lt;/a&gt; — a small toolkit of JSON utilities that run entirely&lt;br&gt;
in the browser. No server. No uploads. Nothing leaves your machine.&lt;/p&gt;

&lt;p&gt;Current tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Formatter / Minifier / Validator&lt;/strong&gt; — the basics, done cleanly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON → TypeScript&lt;/strong&gt; — infers proper types including nested objects, arrays,
nullable fields&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON → CSV&lt;/strong&gt; — handles nested structures by flattening&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;JSON → YAML&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;CSV → JSON&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JSON Diff&lt;/strong&gt; — structural diff, not a naive text comparison&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The interesting technical bits
&lt;/h2&gt;

&lt;p&gt;The TypeScript inference was harder than expected. The naive approach (just map&lt;br&gt;
JSON types to TS primitives) falls apart quickly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Arrays with mixed types → &lt;code&gt;(string | number)[]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Fields that are &lt;code&gt;null&lt;/code&gt; in the sample but probably typed → &lt;code&gt;string | null&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Deeply nested objects → recursive interface generation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The diff was the other tricky one. Text diff on JSON is nearly useless — whitespace&lt;br&gt;
and key order changes produce noise. I implemented a structural diff that compares&lt;br&gt;
the parsed objects, which means reordered keys and re-formatted values don't show&lt;br&gt;
up as changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;More tools (TOML, XML, Base64), and eventually some light content so it ranks for&lt;br&gt;
the searches that bring people to these tools in the first place.&lt;/p&gt;

&lt;p&gt;If you use JSON tools regularly, I'd love to know what you reach for most.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>tooling</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
