# What is JavaScript Object Notation (JSON)?

> JSON is a plain-text format for structured data, defined by RFC 8259: named fields, lists, strings, numbers, true, false and null. OAuth server metadata, agent cards and signed agent grants all carry their data in it.

Explainer by Boston Identity, 2026-10-20. 6 min read. https://insights.bostonidentity.com/glossary/json

- What it is: standard
- Defined by: IETF, RFC 8259 (Standards Track, 2017)
- Who it's for: Teams that sign, hash or parse tokens and API data

## What is JavaScript Object Notation (JSON)?

JavaScript Object Notation (JSON) is a text format for structured data [S1 §1]. It grew out of the way JavaScript writes objects, and its designers aimed for something minimal, portable and textual [S1 §1]. It has four simple types (strings, numbers, true or false, and null) and two ways to group them: objects, which are named fields, and arrays, which are ordered lists [S1 §1].

RFC 8259, published by the Internet Engineering Task Force (IETF) in December 2017, is the current IETF standards-track text for it and replaces RFC 7159 [S1 §1.2]. A second standard, ECMA-404, describes the same grammar, though it allows several practices that RFC 8259 recommends avoiding [S1 §1.2]. The 2017 revision applies reported errata and removes inconsistencies with other JSON specifications [S1 §1.3]. It also points out practices that years of wide use showed make different software disagree [S1 §1.3].

Think of it like this: A JSON object is like a filled-in form with labelled boxes, where a box can hold another small form. The comparison breaks on order: on paper a box's place matters, but the fields of a JSON object have no set order [S1 §1].

Not the same as: Not the same as a JSON Web Token (JWT), a signed token whose contents are written in JSON. RFC 8259 defines only the text format: it says nothing about signing, trust or what any field means [S1 §1].

## How does JavaScript Object Notation (JSON) work?

Two pieces of software meet in every JSON exchange. A generator, the sending code, writes the text, and a parser, the receiving code, turns it back into data its own program can use [S1 §9, §10].

[Figure: A generator writes one JSON value as text and sends it as UTF-8, and a parser reads it back.]

1. **The generator writes one value.** A JSON text is a single value, with optional spaces, tabs or line breaks around it [S1 §2]. That value may be an object, an array, a number, a string, or one of the lowercase words true, false and null [S1 §3]. The generator's output must follow the grammar exactly [S1 §10].
2. **The generator groups values.** An object is a pair of curly brackets around name and value pairs, with a colon after each name and a comma between pairs [S1 §4]. Names are strings, and the names in one object should be unique [S1 §4]. An array is a pair of square brackets around values separated by commas, and the values need not share a type [S1 §5].
3. **The generator writes strings and numbers.** A string sits inside quotation marks, and the quotation mark, the backslash and control characters must be escaped [S1 §7]. Any other character may be escaped too, for example as a backslash, the letter u and four hexadecimal digits [S1 §7]. A number is written in base 10, with no leading zeros, and Infinity and NaN (not a number) are not allowed [S1 §6].
4. **The sender encodes the text as UTF-8.** JSON sent between systems outside a closed ecosystem must use UTF-8, the common byte encoding for Unicode text [S1 §8.1]. The sender must not put a byte order mark at the start of a JSON text sent over a network [S1 §8.1].
5. **The parser reads it back.** A parser must accept every text that follows the grammar, and it may also accept forms that are not JSON [S1 §9]. It may set limits on the size of a text, how deeply it nests, the range and precision of numbers, and the length and content of strings [S1 §9]. Software agrees on whether two names match when it first turns escapes back into characters and then compares code unit by code unit [S1 §8.3]. Software that skips that step may decide that two spellings of one name differ [S1 §8.3].

## Why does JavaScript Object Notation (JSON) matter now?

Many identity checks run on JSON documents. RFC 8414 makes an OAuth client throw away server metadata whose issuer value differs from the address it started from, and it compares the two code point by code point [BI-FIND-2018-0001](https://insights.bostonidentity.com/ref/BI-FIND-2018-0001). RFC 9728 sends a client to a JSON metadata document to learn which server issues tokens for an API [BI-FIND-2025-0388](https://insights.bostonidentity.com/ref/BI-FIND-2025-0388). Under one draft, a client's identity is an https address, and the JSON document published there must contain a client_id whose value must match that address [BI-FIND-2026-0319](https://insights.bostonidentity.com/ref/BI-FIND-2026-0319). The authorization server learns the client's name, redirect addresses and keys by fetching that document, and nothing in it is attested [BI-FIND-2026-0319](https://insights.bostonidentity.com/ref/BI-FIND-2026-0319).

Agent designs now also hash or sign JSON. In Coetzee's draft, a short-lived agent token can carry a SHA-256 hash over the canonical JSON of the tool, its parameters and the target, though that binding is optional [BI-FIND-2026-0524](https://insights.bostonidentity.com/ref/BI-FIND-2026-0524). The enforcement point recomputes that hash over the call actually made and refuses on a mismatch [BI-FIND-2026-0524](https://insights.bostonidentity.com/ref/BI-FIND-2026-0524). The current Agent2Agent (A2A) specification signs an agent's self-description, its Agent Card, over a canonical JSON form [BI-FIND-2026-0457](https://insights.bostonidentity.com/ref/BI-FIND-2026-0457). An audit-record draft names each record by a SHA-256 hash over its canonical JSON [BI-FIND-2026-1158](https://insights.bostonidentity.com/ref/BI-FIND-2026-1158). Each of these needs both sides to turn the same data into the same bytes. RFC 8259 does not promise that. It treats the fields of an object as having no order [S1 §1], and parsing libraries differ on whether they show that order to the program calling them [S1 §4].

One protocol text for an agent platform and a processor makes the client's detached signature over canonical JSON a must in section 2.2 [BI-FIND-2025-0052](https://insights.bostonidentity.com/ref/BI-FIND-2025-0052). The same text lists it as recommended in the header list and as a should in its security section [BI-FIND-2025-0052](https://insights.bostonidentity.com/ref/BI-FIND-2025-0052). The signature is absent from the conformance checklist, so an implementation can pass conformance without ever verifying a signature [BI-FIND-2025-0052](https://insights.bostonidentity.com/ref/BI-FIND-2025-0052). A draft that adds fixes for attacks found since RFC 8725 makes one of them a must: any token with characters other than letters, numbers, dash, underscore and period is not a JWT and must be rejected [BI-FIND-2026-1063](https://insights.bostonidentity.com/ref/BI-FIND-2026-1063). The draft gives that rule as its answer to tokens verified in JSON form but read as compact ones [BI-FIND-2026-1063](https://insights.bostonidentity.com/ref/BI-FIND-2026-1063).

## Where does it fit?

- Compared with JSON Canonicalization Scheme: The JSON Canonicalization Scheme picks one exact way to write a JSON value, so two parties that hash it get the same bytes. RFC 8259 leaves the spacing, the order of an object's fields and the use of escapes open [S1 §2, §4, §7].
- Compared with JSON Web Signature: JSON Web Signature signs a payload so a receiver can check who produced it and that nobody changed it. JSON itself carries data with no protection of its own [S1 §1].
- Compared with CBOR: CBOR (Concise Binary Object Representation) is a compact binary cousin of JSON, used with CBOR Object Signing and Encryption (COSE) to carry signed data. JSON is text, and must travel as UTF-8 between open systems [S1 §8.1].
- Compared with JSON-LD: JSON-LD is JSON whose field names point to shared vocabularies, so different systems agree on what a field means. In plain JSON a name is just a string [S1 §4].

## What goes wrong?

- The names within an object should be unique, and that is only a should [S1 §4]. An object that repeats a name still follows the JSON grammar, and a parser must accept every text that follows the grammar [S1 §4, §9]. RFC 8259 leaves what happens next to each implementation: many report only the last pair, others report an error or fail to parse the object, and some report every pair [S1 §4]. The standard calls the result unpredictable [S1 §4]. Only when every name is unique will all receiving software agree on which value goes with which name [S1 §4]. With a repeated name, two components that read the same object can act on different values.
- Integers agree exactly across common software only between -(2^53)+1 and (2^53)-1 [S1 §6]. Larger values, or long decimals, may be rounded on the way in [S1 §6].
- The grammar lets a string carry a lone half of a UTF-16 surrogate pair, such as "\uDEAD" [S1 §8.2]. Software then behaves unpredictably and may even crash [S1 §8.2].
- A parser may accept forms that are not JSON, and its limits on size and nesting are optional [S1 §9]. Two parsers can therefore disagree about the same input.
- Parsing JSON with JavaScript's eval() function, the standard says, generally constitutes "an unacceptable security risk", because the text could contain code [S1 §12].

## What should a security leader ask?

1. Where we hash or sign JSON, in tokens, agent cards or audit records, which canonical form do both sides use, and is it written down?
2. When an incoming object repeats a field name, do our token validators and API gateways reject it, or which value do they keep?
3. What size and nesting-depth limits do our parsers set on JSON from outside?
4. Do any of our identifiers or amounts travel as JSON numbers larger than 2^53?
5. Does any of our code parse JSON with eval() or a similar function?

## Sources

- [S1] [The JavaScript Object Notation (JSON) Data Interchange Format](https://www.rfc-editor.org/rfc/rfc8259) (IETF, RFC 8259, Standards Track, December 2017)

## Evidence

- [BI-FIND-2018-0001](https://insights.bostonidentity.com/ref/BI-FIND-2018-0001): RFC 8414 makes the issuer value the client's guard against a fake authorization server. The client builds the metadata URL from the issuer identifier, and the "issuer" the document returns MUST be identical to it; if the two differ, the RFC says "the data contained in the response MUST NOT be used." Section 6.2 names the attack this blocks: a document that claims a real server's issuer but lists the attacker's own endpoints and signing keys. Clients MUST also check the TLS certificate, which the authors say prevents man-in-the-middle and DNS-based attacks. Section 4 sets what identical means: strings are compared code point by code point, and Unicode normalization MUST NOT be applied. A client that supports signed metadata MUST let the values in the signed JWT take precedence over the plain JSON ones. (from "RFC 8414 tells an OAuth client to discard server metadata whose issuer differs from the URL it started from")
- [BI-FIND-2025-0388](https://insights.bostonidentity.com/ref/BI-FIND-2025-0388): RFC 9728 lets a client that knows nothing about an API find out where to get a token for it. The resource server may answer an unauthenticated call with a WWW-Authenticate header whose resource_metadata parameter points to a JSON metadata document; the client reads the authorization server from it and then fetches that server's own RFC 8414 metadata. A later challenge tells the client the metadata may have changed, which the authors say lets a resource server change authorization servers "without any other coordination with clients." Only the resource field is required, authorization_servers is optional, and how the client gets a client identifier is out of scope. The RFC never mentions AI agents. Our briefing on the Model Context Protocol's 2026-07-28 authorization specification found that it requires MCP servers to publish this document. (from "RFC 9728 tells clients where an API's tokens come from and leaves most of the trust decision to them")
- [BI-FIND-2026-0319](https://insights.bostonidentity.com/ref/BI-FIND-2026-0319): Under this draft a client's identity is a web address and whatever its owner publishes there. The client_id is an https URL; the JSON document at that URL 'MUST contain a client_id property whose value MUST match' it; and the authorization server learns the client's name, redirect addresses and keys by fetching that document. Nothing is attested. The draft says so in its own security section: change the URL and it is a new client, lose control of the domain and a third party can 'assume the client's identity'. For an AI agent this replaces an anonymous registration with a name anyone can look up, which is progress, and it does not tell the server what software is behind the name. (from "The way MCP now identifies an agent proves one thing: someone controls a web address")
- [BI-FIND-2026-0524](https://insights.bostonidentity.com/ref/BI-FIND-2026-0524): Coetzee's answer to a hijacked agent is a token that is good for one declared call and nothing else. A root token from a person narrows through delegated tokens to a leaf that lives "on the order of seconds" and can carry a digest: SHA-256 over the canonical JSON of the tool, its parameters and the target. The enforcement point recomputes the digest over the call actually made and refuses on a mismatch or a missing claim. The draft is plain about what that buys. A compromised agent holds a token "cryptographically useless" for any other action, but nothing stops an authorized agent doing a harmful thing it declared. And the binding itself is optional: a MAY on each leaf token. (from "Coetzee's agent token is good for one declared call, and the hard part is hashing that call the same way twice")
- [BI-FIND-2026-0457](https://insights.bostonidentity.com/ref/BI-FIND-2026-0457): The draft expired on 1 September 2026 at revision 02 with no working group, no implementation and no list discussion we could find. The A2A specification it extends chose a different answer in the meantime: the current A2A text signs an Agent Card as a JWS over a canonical JSON form (AgentCardSignature) and does not mention selective disclosure. On the datatracker, agent self-description now has at least five individual drafts and no working group: this one, a framework-neutral AgentCard (April 2026), an OpenA2A Agent Identity Protocol at revision 04 (October 2026), an A2A trust model at revision 03 (September) and a WebFinger profile for naming agents (August). Each describes a registry or an authority; none says who runs it. (from "Cisco's SD-Card puts an A2A Agent Card in a selective-disclosure token, and leaves its registry out of scope")
- [BI-FIND-2026-1158](https://insights.bostonidentity.com/ref/BI-FIND-2026-1158): The draft is plain about what a valid Capsule does not prove. Its ID is a SHA-256 hash over the record's canonical JSON, kept apart from any signature, and a verified Producer Envelope proves only that the holder of the key named in kid signed that ID, not that the key is authorized for the Capsule's operator, developer or action. Those two fields are required plain strings, naming the accountable tenant and the agent's identity and version. A verifier that relies on producer identity for a policy decision MUST apply an outside authorization rule and "MUST NOT infer authority from signature validity alone". The profile is deliberately agnostic about delegation, which a separate draft by Rampalli binds in. The effect has the same limit: confirmed means the producer bound the bytes of a response it observed, not that the world reached that state, and the draft does not mitigate a forged success delivered on the path, which produces an honest confirmed Capsule for an effect that never landed. (from "A draft records every AI agent verdict, refusals too, and won't let a dispatched action pass as confirmed")
- [BI-FIND-2025-0052](https://insights.bostonidentity.com/ref/BI-FIND-2025-0052): The agent platform's identity to the processor is a bearer token the RFC never says who issues. Authorization: Bearer is REQUIRED in three places; the detached Signature over canonical JSON and the Timestamp are a client MUST in section 2.2, RECOMMENDED in the header list, a SHOULD in the security section and absent from the conformance checklist, so an implementation can pass conformance without ever verifying a signature. The error vocabulary disagrees with itself too: section 2.6 and the code list use 409 duplicate_request while the idempotency section uses 422 idempotency_conflict and 409 idempotency_in_flight. The document reads as the write-up of one working integration; a protocol meant for strangers would have pinned these down. (from "OpenAI and Stripe's agent checkout stores a card for one capped purchase, and no one issues the caller's token")
- [BI-FIND-2026-1063](https://insights.bostonidentity.com/ref/BI-FIND-2026-1063): Two of the fixes the draft adds for attacks found since RFC 8725 are MUSTs. Libraries must let the verifier tell a signed JWT from an encrypted one; the draft cites CVE-2023-51774 for libraries that do not distinguish a successful decryption from a successful signature validation. And any token with characters other than letters, numbers, dash, underscore and period "is not a JWT and MUST be rejected", the draft's answer to tokens verified in JSON form but read as compact ones. A third fix is softer: against an algorithm name like "noNE" slipping past a blocklist, libraries SHOULD use allowlists. (from "The draft replacing RFC 8725 requires rejecting malformed JWTs but only recommends denial-of-service limits")

---

© 2026 Boston Identity LLC. All rights reserved. Published by Boston Identity LLC.
Quote up to 100 words with the credit "Boston Identity, IAM Insights" and a link to https://insights.bostonidentity.com/glossary/json as the source. Claim numbers may be cited freely. Training, fine-tuning and evaluation use of this page is permitted, and the text-and-data-mining reservation is lifted on it. Republishing it or offering it as a data set still needs permission.
Terms: https://insights.bostonidentity.com/terms · How to cite: https://insights.bostonidentity.com/cite
