# JSON - The Fine Print: Part 1

DevFeed: [JSON - The Fine Print: Part 1](<https://devfeed.tech/articles/json-the-fine-print-part-1-22266.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2024/10/json-the-fine-print-part-1.html>)

Published: 2024-10-23T00:00:00Z

Content type: article

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [JSON](<https://devfeed.tech/topics/json.md>), [Data serialization](<https://devfeed.tech/topics/data-serialization.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [api-layers](<https://devfeed.tech/tags/api-layers.md>), [apis](<https://devfeed.tech/tags/apis.md>), [common-serialization-errors](<https://devfeed.tech/tags/common-serialization-errors.md>), [common-serialization-mistakes](<https://devfeed.tech/tags/common-serialization-mistakes.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [data-serialization](<https://devfeed.tech/tags/data-serialization.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [data-structure-separation](<https://devfeed.tech/tags/data-structure-separation.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [data-transmission](<https://devfeed.tech/tags/data-transmission.md>), [data-validation](<https://devfeed.tech/tags/data-validation.md>), [database](<https://devfeed.tech/tags/database.md>), [database-schema](<https://devfeed.tech/tags/database-schema.md>), [databases](<https://devfeed.tech/tags/databases.md>), [elasticsearch](<https://devfeed.tech/tags/elasticsearch.md>), [encoding-json](<https://devfeed.tech/tags/encoding-json.md>), [function](<https://devfeed.tech/tags/function.md>), [go-json-types](<https://devfeed.tech/tags/go-json-types.md>), [go-language-serialization](<https://devfeed.tech/tags/go-language-serialization.md>), [go-language-validation](<https://devfeed.tech/tags/go-language-validation.md>), [go-type-mapping](<https://devfeed.tech/tags/go-type-mapping.md>), [json](<https://devfeed.tech/tags/json.md>), [json-best-practices](<https://devfeed.tech/tags/json-best-practices.md>), [json-go-mapping](<https://devfeed.tech/tags/json-go-mapping.md>), [json-marshaling](<https://devfeed.tech/tags/json-marshaling.md>), [json-unmarshaling](<https://devfeed.tech/tags/json-unmarshaling.md>), [json-validation](<https://devfeed.tech/tags/json-validation.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-space](<https://devfeed.tech/tags/memory-space.md>), [network](<https://devfeed.tech/tags/network.md>), [network-operations](<https://devfeed.tech/tags/network-operations.md>), [passing-serialized-data](<https://devfeed.tech/tags/passing-serialized-data.md>), [rest](<https://devfeed.tech/tags/rest.md>), [rest-apis](<https://devfeed.tech/tags/rest-apis.md>), [schema-less-data-format](<https://devfeed.tech/tags/schema-less-data-format.md>), [serialization](<https://devfeed.tech/tags/serialization.md>), [serialization-format](<https://devfeed.tech/tags/serialization-format.md>), [serialization-mistakes](<https://devfeed.tech/tags/serialization-mistakes.md>), [serialization-protocols](<https://devfeed.tech/tags/serialization-protocols.md>)

## AI overview

Serialization converts values to bytes for transfer or storage, so the excerpt recommends doing it at program boundaries rather than passing serialized values between functions that share memory, which adds CPU and memory costs. It also warns that reusing one data structure across API and storage layers couples the API to database changes and may expose sensitive data. The excerpt identifies API, business, and storage as distinct layers, but cuts off before explaining their development velocities or the rest of the article's JSON-specific details.

## Source excerpt

Introduction Everybody knows JSON, it'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. In this article we'll explore some big picture aspects and some low level details of using JSON. Serialization Before diving into JSON, I'd like to take a look at serialization in general and discuss common mistakes I've seen my customers make.