JSON
JSON is a text format for sharing data. It can contain objects, arrays, text, numbers, `true` or `false`, and `null`.
Another example
A payment service sends `{"amount":2400,"currency":"TWD"}` as UTF-8 and checks it against a contract. A 19-digit invoice ID is sent as text because some systems cannot store that number exactly. Data with the same member name twice is rejected.
Main parts
- 01Structural value
- 02Member names or array order
- 03Primitive values
Use it when
Use JSON for structured data when both sides agree on field types and whether `null` is allowed. They must also agree on number limits and version rules.
Do not use it when
JSON is not a schema. Standard JSON does not allow comments or `NaN`, and object member order has no meaning.
Name used in code
application/json; RFC 8259 grammar encoded as UTF-8 for interoperable exchange Before you ship
Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.
Outcome: Design or review JSON for this system while keeping data correct, secure, and easy to operate. User context: A payment service sends `{"amount":2400,"currency":"TWD"}` as UTF-8 and checks it against a contract. A 19-digit invoice ID is sent as text because some systems cannot store that number exactly. Data with the same member name twice is rejected. Technical concept or control: JSON. Why it fits: Use JSON for structured data when both sides agree on field types and whether `null` is allowed. They must also agree on number limits and version rules. Do not use it when: JSON is not a schema. Standard JSON does not allow comments or `NaN`, and object member order has no meaning. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary): The standard covers only the listed scope. It does not choose the visual style, product decision, or Vibulary example. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.
Check this request
Review the current use of JSON. Definition: JSON is a text format for sharing data. It can contain objects, arrays, text, numbers, `true` or `false`, and `null`. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.