4.5 JSON
JavaScript Object Notation (JSON) is a standard notation for sending and receiving structured information. JSON is not the only such notation. XML (§7.14), ASN.1, and Google’s Protocol Buffers serve similar purposes and each has its niche, but because of its simplicity, readability, and universal support, JSON is the most widely used.
Go has excellent support for encoding and decoding these formats,
provided by the standard library packages encoding/json,
encoding/xml, encoding/asn1, and so on, and these
packages all have similar APIs.
This section gives a brief overview of the most important parts of the
encoding/json package.
JSON is an encoding of JavaScript values—strings, numbers, booleans, arrays, and objects—as Unicode ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access