Will two different apps agree about the note?
06Send identical text to readers with different choices and capacities, then repair the disagreement.
The sender wants two different apps to receive the same meaning. These are deliberately chosen reader behaviors.
One note, two readers
{"pet":"cat","pet":"dog"}What happens if you change this?
Make one change, then watch again. Restart restores the original example.
The consumers agree on the name/value mappings and decoded string content.
Key idea: Good exchange means readers agree about values, types and field meanings, not merely that both received the same text.
Terms
- JSON
- JavaScript Object Notation: shared rules for writing data as text. Apps in many languages use it.
- Object
- A group of named values, like drawers with different labels.
- Array
- A list whose values have meaningful positions.
- String
- A text value between quotation marks.
- Grammar
- Rules for which marks and words may appear and where.
- Interoperability
- Different apps can read the same data and agree about its meaning.
- Media type
- A label describing the kind of content, such as application/json. It does not prove that the content is safe.
- Schema
- An application’s extra rules about which named values, types and ranges it expects.
Rules & examples
An exchange succeeds when readers agree on values and meaning.
- Use unique member names and Unicode strings without broken surrogate pairs.
- Agree on useful numeric ranges; do not rely on object-member order or raw escape spelling.
- The registered media type is application/json with no defined optional charset parameter.
JSON does not supply a domain schema, date type, canonical serialization, or cryptographic signature format. Applications must define those conventions when they need them.
RFC 8259 §§4,6,8.2–8.3: use unique names, complete Unicode representations, agreed numeric capacities and decoded-value comparison. The two consumers are selected examples, not a claim every implementation behaves this way. §11 registers application/json and defines no charset parameter. JSON itself defines no date type, application schema, canonical form, signature, encryption or authorization. RFC 7493 adds an interoperability profile; RFC 8785 separately defines canonicalization.
Sources
New to this? Start hereA quick picture + helpful background
First, agree how to read the message.
An encoding tells a reader how to interpret bytes. A format tells it how values fit together. Correctly reading a value does not make that value trustworthy.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.