<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>JSON on</title><link>https://www.ardanlabs.com/tags/json/</link><description>Recent content in JSON on</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 07 Jan 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.ardanlabs.com/tags/json/index.xml" rel="self" type="application/rss+xml"/><item><title>Everything You Wanted to Ask About Rust – Answered by Herbert Wolverson</title><link>https://www.ardanlabs.com/blog/2026/01/everything-you-wanted-to-ask-about-rust-answered-by-herbert-wolverson/</link><pubDate>Wed, 07 Jan 2026 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2026/01/everything-you-wanted-to-ask-about-rust-answered-by-herbert-wolverson/</guid><description>&lt;p&gt;In a recent livestream with JetBrains, Vitaly Bragilevsky sat down with Herbert Wolverson, our Lead Rust Consultant and Instructor here at Ardan Labs, to talk about everything Rust developers – beginners and pros alike – are curious about.&lt;/p&gt;&#10;&lt;p&gt;Watch the full livestream replay on the Ardan Labs Channel and check out the &lt;a href="https://github.com/thebracket/JetBrainsWinter"&gt;GitHub repo&lt;/a&gt; with Herbert’s prepared answers and code samples. Below is a short summary of the 23 questions that were covered during the livestream.&lt;/p&gt;</description></item><item><title>JSON - The Fine Print: Part 3 - Zero vs Missing Values</title><link>https://www.ardanlabs.com/blog/2025/05/json-the-fine-print-part-3.html</link><pubDate>Mon, 19 May 2025 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2025/05/json-the-fine-print-part-3.html</guid><description>&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;In &lt;a href="https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-part-1.html"&gt;part 1&lt;/a&gt; we took a higher level view on serialization in general and JSON in specific.&#10;In &lt;a href="https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-part-2.html"&gt;part 2&lt;/a&gt; we looked at emitting JSON.&lt;/p&gt;&#10;&lt;p&gt;In part 3, we&amp;rsquo;ll look at an issue you might encounter when consuming JSON, Zero vs NULL field values. To clarify the definition of NULL, this means the absence of value.&lt;/p&gt;&#10;&lt;p&gt;So here is the question:&lt;/p&gt;&#10;&lt;p&gt;Given a field in a Go struct set to its zero value, how do you know that zero value was set by the user or it&amp;rsquo;s zero because it was never provided?&lt;/p&gt;</description></item><item><title>JSON - The Fine Print: Part 2 - Emitting JSON</title><link>https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-part-2.html</link><pubDate>Tue, 04 Feb 2025 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-part-2.html</guid><description>&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;In &lt;a href="https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-part-1.html"&gt;part 1&lt;/a&gt; we took a high-level view on serialization and JSON. In this part, we&amp;rsquo;ll roll our sleeves and start working with JSON, focused on emitting JSON. You might think this is a basic topic, but there is much more to it than just calling &lt;code&gt;json.Marshal&lt;/code&gt;.&lt;/p&gt;&#10;&lt;h3 id="jsonmarshal-vs-jsonencoder"&gt;&lt;code&gt;json.Marshal&lt;/code&gt; vs &lt;code&gt;json.Encoder&lt;/code&gt;&lt;/h3&gt;&#10;&lt;p&gt;The &lt;code&gt;encoding/json&lt;/code&gt; package has two main APIs: &lt;code&gt;Marshal&lt;/code&gt; and &lt;code&gt;NewEncoder&lt;/code&gt;. The &lt;code&gt;Marshal&lt;/code&gt; function returns a &lt;code&gt;[]byte&lt;/code&gt; while the &lt;code&gt;NewEncoder&lt;/code&gt; function will write to an &lt;code&gt;io.Writer&lt;/code&gt;. The question is: When should you use one API over the other?&lt;/p&gt;</description></item><item><title>Scalable JSON Streaming with HTTP and Go - Ep.5</title><link>https://www.ardanlabs.com/blog/2024/11/scalable-json-streaming-with--http-and-go.html</link><pubDate>Mon, 25 Nov 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/11/scalable-json-streaming-with--http-and-go.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Welcome to the final episode of the JSON for Engineers series! In this concluding session, we tackle the challenges of working with large JSON datasets, exploring efficient strategies for streaming data while minimizing memory usage. These techniques enable developers to handle massive payloads without overburdening system resources, ensuring scalable and cost-effective applications.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;JSON Streaming:&lt;/strong&gt; Using JSON Lines for memory-efficient data transmission.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;HTTP Chunked Encoding:&lt;/strong&gt; Leveraging HTTP/1.1 chunked transfer encoding for streaming large datasets.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Practical Error Handling:&lt;/strong&gt; Logging and managing errors in streaming JSON responses.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;This episode starts by addressing the inefficiencies of constructing large JSON objects in memory when working with massive datasets, such as database query results. Instead of consuming significant memory to create one monolithic JSON object, the recommended approach involves using JSON Lines (NDJSON), a format where each line represents a separate JSON object. This method reduces memory requirements by transmitting data incrementally. Using Go’s &lt;code&gt;encoding/json&lt;/code&gt; package, developers can easily encode and stream multiple JSON objects, as it automatically appends newlines between objects. On the receiving end, decoding JSON streams requires careful looping to handle incoming data dynamically while avoiding memory reuse issues, which could lead to errors or stale data.&lt;/p&gt;</description></item><item><title>JSON Handling and Type Management with Large Datasets in Go - Ep.4</title><link>https://www.ardanlabs.com/blog/2024/10/json-handling-and-type-management-with-large-datasets-in-go.html</link><pubDate>Thu, 14 Nov 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/10/json-handling-and-type-management-with-large-datasets-in-go.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Welcome to Episode 4 of the JSON for Engineers series! In this episode, we tackle the complexities of working with JSON data, especially when dealing with extensive datasets and optimizing type management. Here, Miki introduces key strategies for managing large JSON documents, avoiding unnecessary type definitions, and using Go’s encoding/json package to handle custom serialization needs effectively.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;Type Pollution Avoidance:&lt;/strong&gt; Minimizing type declarations by using selective decoding and anonymous structures.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Custom JSON Serialization:&lt;/strong&gt; Implementing Go’s Marshaler and Unmarshaler interfaces for precise JSON formatting.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Working with Mixed-Type Arrays:&lt;/strong&gt; Handling JSON arrays containing diverse types in Go&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Miki begins by addressing the challenge of “type pollution” when working with large JSON responses. When dealing with massive JSON datasets, like data from social trading platforms, defining a separate type for every possible field can quickly lead to an unwieldy codebase. To streamline this, Miki demonstrates how to leverage anonymous structures and selective decoding in Go. By defining only the relevant fields within a function, we can avoid creating additional struct types, making the code more compact and efficient. This technique is especially useful when working with JSON data containing nested fields that may not all be necessary for your application. Through this approach, Go’s encoding/json package will simply ignore any unreferenced fields, allowing you to handle only the data that matters to your project.&lt;/p&gt;</description></item><item><title>Managing JSON Field Tags and Value Handling in Go - Ep.3</title><link>https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-ep-3-managing-json-field-tags-and-value-handling-in-go.html</link><pubDate>Thu, 31 Oct 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-ep-3-managing-json-field-tags-and-value-handling-in-go.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Welcome to Episode 3 of JSON for Engineers! In this episode, Miki Tebeka explores the intricacies of JSON field mapping and value handling, especially when working in strongly typed languages like Go. This session covers the practical challenges of matching JSON fields to Go struct fields, distinguishing between missing and zero values, and using default values to ensure robust JSON parsing. These strategies are crucial for engineers managing flexible JSON data structures in a language with strict type requirements.&lt;/p&gt;</description></item><item><title>JSON - The Fine Print: Part 1</title><link>https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-part-1.html</link><pubDate>Wed, 23 Oct 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-part-1.html</guid><description>&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;Everybody knows &lt;a href="https://www.json.org/"&gt;JSON&lt;/a&gt;, it&amp;rsquo;s a simple serialization format and the default format for REST APIs. Like many other topics, there are fine points you should know in order to work with JSON more effectively and avoid common mistakes.&lt;/p&gt;&#10;&lt;p&gt;In this article we&amp;rsquo;ll explore some big picture aspects and some low level details of using JSON.&lt;/p&gt;&#10;&lt;h3 id="serialization"&gt;Serialization&lt;/h3&gt;&#10;&lt;p&gt;Before diving into JSON, I&amp;rsquo;d like to take a look at serialization in general and discuss common mistakes I&amp;rsquo;ve seen my customers make.&lt;/p&gt;</description></item><item><title>Exploring JSON Encoding and Data Handling in Go - Ep.2</title><link>https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-ep-2-exploring-json-encoding-and-data-handling-in-go.html</link><pubDate>Thu, 17 Oct 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-ep-2-exploring-json-encoding-and-data-handling-in-go.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Welcome to Episode 2 of JSON for Engineers! In this episode, we explore the unique characteristics of JSON as a schema-less format, discussing both its benefits and challenges. You&amp;rsquo;ll learn how JSON&amp;rsquo;s flexibility, while enabling rapid development, can create issues when working with strongly-typed languages like Go. Additionally, we&amp;rsquo;ll cover the differences between JSON and more compact binary formats, and how to handle JSON’s broader use in web applications.&lt;/p&gt;</description></item><item><title>Data Integrity with JSON Serialization - Ep.1</title><link>https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-ep-1-data-integrity-with-json-serialization.html</link><pubDate>Thu, 03 Oct 2024 00:00:00 +0000</pubDate><guid>https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-ep-1-data-integrity-with-json-serialization.html</guid><description>&lt;h3 id="introduction"&gt;Introduction:&lt;/h3&gt;&#10;&lt;p&gt;Welcome to Episode 1 of JSON for Engineers! In this first episode, Miki Tebeka dives into the fundamentals of serialization, with a special focus on JSON, one of the most widely-used data formats in software engineering. Miki draws from his extensive development experience to explain how JSON fits into the bigger picture of data interchange and serialization, laying the groundwork for engineers to use it effectively in real-world applications.&lt;/p&gt;</description></item></channel></rss>