<?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: yutilo</title>
    <description>The latest articles on DEV Community by yutilo (@yutilo_b21bde222215d1b115).</description>
    <link>https://dev.to/yutilo_b21bde222215d1b115</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%2F3700266%2Fc6da1ca7-9c0e-4197-9519-c46d5b71c928.png</url>
      <title>DEV Community: yutilo</title>
      <link>https://dev.to/yutilo_b21bde222215d1b115</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yutilo_b21bde222215d1b115"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>yutilo</dc:creator>
      <pubDate>Thu, 08 Jan 2026 12:59:42 +0000</pubDate>
      <link>https://dev.to/yutilo_b21bde222215d1b115/-47fk</link>
      <guid>https://dev.to/yutilo_b21bde222215d1b115/-47fk</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/yutilo_b21bde222215d1b115" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3700266%2Fc6da1ca7-9c0e-4197-9519-c46d5b71c928.png" alt="yutilo_b21bde222215d1b115"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/yutilo_b21bde222215d1b115/how-json-works-behind-the-scenes-in-web-apps-29p0" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;How JSON Works Behind the Scenes in Web Apps&lt;/h2&gt;
      &lt;h3&gt;yutilo ・ Jan 8&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#json&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#api&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#programming&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>json</category>
      <category>api</category>
      <category>programming</category>
    </item>
    <item>
      <title>How JSON Works Behind the Scenes in Web Apps</title>
      <dc:creator>yutilo</dc:creator>
      <pubDate>Thu, 08 Jan 2026 11:25:51 +0000</pubDate>
      <link>https://dev.to/yutilo_b21bde222215d1b115/how-json-works-behind-the-scenes-in-web-apps-29p0</link>
      <guid>https://dev.to/yutilo_b21bde222215d1b115/how-json-works-behind-the-scenes-in-web-apps-29p0</guid>
      <description>&lt;h1&gt;How JSON Works Behind the Scenes in Web Apps&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;A deep dive into serialization, parsing mechanics in modern JavaScript engines, security implications, and how data travels across the web.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;
For millions of developers, JSON (JavaScript Object Notation) is the heartbeat of the modern web.
We call &lt;code&gt;JSON.stringify()&lt;/code&gt; to send data and &lt;code&gt;JSON.parse()&lt;/code&gt; to read it—often without a second thought.
&lt;/p&gt;

&lt;p&gt;
But what actually happens under the hood?  
How does a JavaScript object in memory become a string, travel across the internet, and reassemble itself in milliseconds?
&lt;/p&gt;

&lt;p&gt;
Let’s peel back the layers and explore how JSON truly works behind the scenes in modern web applications.
&lt;/p&gt;




&lt;h2&gt;Table of Contents&lt;/h2&gt;




&lt;h2&gt;1. Serialization: From Memory to String&lt;/h2&gt;

&lt;p&gt;
Everything begins with &lt;strong&gt;serialization&lt;/strong&gt;.
A JavaScript object in memory isn’t text—it’s a complex structure made of references, hidden classes, and values stored in RAM.
Networks can’t transmit that structure directly, so it must be flattened into a linear format.
&lt;/p&gt;

&lt;p&gt;
That’s exactly what &lt;code&gt;JSON.stringify()&lt;/code&gt; does.
&lt;/p&gt;

&lt;h3&gt;How Serialization Works&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Recursive traversal of the object tree&lt;/li&gt;
  &lt;li&gt;Keys must be strings wrapped in double quotes&lt;/li&gt;
  &lt;li&gt;Values must be valid JSON types (string, number, boolean, null, object, array)&lt;/li&gt;
  &lt;li&gt;Functions and &lt;code&gt;undefined&lt;/code&gt; values are removed&lt;/li&gt;
  &lt;li&gt;Circular references throw an error&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;TypeError: Converting circular structure to JSON&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;The &lt;code&gt;replacer&lt;/code&gt; Function (Often Overlooked)&lt;/h3&gt;

&lt;p&gt;
&lt;code&gt;JSON.stringify()&lt;/code&gt; accepts a second argument—a replacer—that lets you filter or transform data during serialization.
&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
const user = {
  name: "Alice",
  age: 30,
  password: "supersecretHash"
};

const json = JSON.stringify(user, (key, value) =&amp;gt; {
  if (key === "password") return undefined;
  return value;
});

console.log(json);
// {"name":"Alice","age":30}
&lt;/code&gt;&lt;/pre&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Security Tip:&lt;/strong&gt; This is one of the safest ways to strip sensitive data before it leaves memory.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;2. On the Wire: Headers, Encoding, and Compression&lt;/h2&gt;

&lt;p&gt;
Once serialized, JSON becomes just text—but how it’s sent matters.
&lt;/p&gt;

&lt;h3&gt;Content-Type Matters&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;
Content-Type: application/json
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
This header tells the receiver how to interpret the payload.
&lt;/p&gt;

&lt;h3&gt;Compression Is the Real Performance Boost&lt;/h3&gt;

&lt;p&gt;
JSON is highly repetitive, which makes it extremely compressible.
&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Raw JSON: 5 MB&lt;/li&gt;
  &lt;li&gt;Gzipped/Brotli: ~800 KB&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
This is why JSON feels “fast” despite being text-based.
&lt;/p&gt;

&lt;h3&gt;UTF-8 Encoding&lt;/h3&gt;

&lt;p&gt;
JSON uses UTF-8 by default, allowing it to support every language and symbols—including emojis 🚀.
If text appears corrupted, it’s almost always an encoding mismatch, not a JSON issue.
&lt;/p&gt;




&lt;h2&gt;3. Deserialization: Turning Text Back Into Objects&lt;/h2&gt;

&lt;p&gt;
When the JSON arrives, the receiving side must parse it.
&lt;code&gt;JSON.parse()&lt;/code&gt; reads the string character by character and reconstructs objects in memory.
&lt;/p&gt;

&lt;h3&gt;How Modern Engines Optimize Parsing&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Scan skipping: strings may not be fully scanned until accessed&lt;/li&gt;
  &lt;li&gt;Hidden class reuse for objects with identical shapes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
Parsing large arrays of identical objects becomes surprisingly memory-efficient.
&lt;/p&gt;

&lt;h3&gt;The &lt;code&gt;reviver&lt;/code&gt; Function&lt;/h3&gt;

&lt;p&gt;
Just like serialization, parsing supports transformation through a second argument.
&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
const json = '{"name":"Event","date":"2025-01-01T12:00:00Z"}';

const data = JSON.parse(json, (key, value) =&amp;gt; {
  if (key === "date") return new Date(value);
  return value;
});

console.log(data.date instanceof Date); // true
&lt;/code&gt;&lt;/pre&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Performance Note:&lt;/strong&gt; Using &lt;code&gt;eval()&lt;/code&gt; to parse JSON is dangerous and slow. &lt;code&gt;JSON.parse()&lt;/code&gt; is both safer and faster.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;4. Security: Where JSON Meets Identity and Attacks&lt;/h2&gt;

&lt;p&gt;
JSON plays a central role in authentication systems, especially through JSON Web Tokens (JWTs).
A JWT is simply three JSON objects (header, payload, signature) encoded and joined together.
&lt;/p&gt;

&lt;h3&gt;Common JSON Security Risks&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;
&lt;strong&gt;JSON Injection:&lt;/strong&gt; Never build JSON using string concatenation&lt;/li&gt;
  &lt;li&gt;
&lt;strong&gt;Large Payload Attacks:&lt;/strong&gt; Deeply nested or massive JSON can exhaust memory or stack space&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;strong&gt;Best Practice:&lt;/strong&gt; Always enforce request size limits and nesting depth limits on APIs.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;5. Handling Large and Complex Data&lt;/h2&gt;

&lt;h3&gt;Big Numbers&lt;/h3&gt;

&lt;p&gt;
JavaScript uses IEEE-754 numbers. Integers larger than &lt;code&gt;2^53&lt;/code&gt; lose precision.
&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
9007199254740993 === 9007199254740992 // true
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
&lt;strong&gt;Solution:&lt;/strong&gt; Send large identifiers as strings.
&lt;/p&gt;

&lt;h3&gt;Huge JSON Files&lt;/h3&gt;

&lt;p&gt;
Parsing very large JSON files blocks the main thread and freezes the UI.
&lt;/p&gt;

&lt;p&gt;
Better approaches include:
&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;JSON Lines (JSONL)&lt;/li&gt;
  &lt;li&gt;Streaming parsers&lt;/li&gt;
  &lt;li&gt;Web Workers&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;6. The Future: JSON-LD and Semantic Data&lt;/h2&gt;

&lt;p&gt;
JSON continues to evolve. JSON-LD adds semantic meaning and is widely used for structured data and SEO.
&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How JSON Works",
  "author": "JSONMaster"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;
This allows machines—not just humans—to understand what the data represents.
&lt;/p&gt;




&lt;h2&gt;7. Beyond Basic JSON&lt;/h2&gt;

&lt;p&gt;
As applications scale, developers rely on:
&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Query languages for JSON&lt;/li&gt;
  &lt;li&gt;Schema validation&lt;/li&gt;
  &lt;li&gt;Type generation for safer code&lt;/li&gt;
  &lt;li&gt;Visualization tools for deeply nested data&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
These practices are no longer optional at scale—they’re essential.
&lt;/p&gt;




&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;
JSON is far more than curly braces and quotes.
It’s a carefully designed data format optimized by browsers, compressed by networks, secured by best practices, and deeply integrated into how the web works.
&lt;/p&gt;

&lt;p&gt;
Understanding serialization, transmission, parsing, and validation helps you build faster, safer, and more reliable web applications.
&lt;/p&gt;

&lt;p&gt;
The next time you use &lt;code&gt;JSON.stringify()&lt;/code&gt; or &lt;code&gt;JSON.parse()&lt;/code&gt;, you’ll know exactly what’s happening behind the scenes—and why it matters.
&lt;/p&gt;




&lt;h3&gt;Discussion&lt;/h3&gt;

&lt;ul&gt;
  &lt;li&gt;Have you ever debugged performance issues caused by large JSON payloads?&lt;/li&gt;
  &lt;li&gt;Do you still encounter APIs sending numbers that should be strings?&lt;/li&gt;
  &lt;li&gt;What’s the biggest JSON mistake you’ve seen in production?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s discuss 👇&lt;/p&gt; 

&lt;p&gt;Some of greate tools for json - jsonmaster , jsonlint&lt;/p&gt;



</description>
      <category>webdev</category>
      <category>json</category>
      <category>api</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
