JSON
JSON
JSON ist ein Textformat zum Austausch von Daten. Es kann Objekte, Arrays, Text, Zahlen, `true` oder `false` und `null` enthalten.
Ein weiteres Beispiel
Ein Zahlungsdienst sendet `{"amount":2400,"currency":"TWD"}` als UTF-8 und prüft es anhand eines Vertrags. Eine 19-stellige Rechnungs-ID wird als Text gesendet, weil einige Systeme diese Zahl nicht genau speichern können. Daten mit demselben Mitgliedsnamen zweimal werden abgelehnt.
Hauptteile
- 01Strukturwert
- 02Mitgliedsnamen oder Array-Reihenfolge
- 03Primitive Werte
Verwenden Sie es, wenn
Verwenden Sie JSON für strukturierte Daten, wenn beide Seiten sich auf Feldtypen und darauf einigen, ob `null` erlaubt ist. Sie müssen sich auch auf Zahlenlimits und Versionsregeln einigen.
Nutze es nicht, wenn
JSON ist kein Schema. Standard-JSON erlaubt keine Kommentare oder `NaN`, und die Reihenfolge der Objektelemente hat keine Bedeutung.
In Code verwendeter Name
application/json; RFC 8259 grammar encoded as UTF-8 for interoperable exchange Vor dem Ausliefern
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: Complete the task with JSON (JSON). User context: Ein Zahlungsdienst sendet `{"amount":2400,"currency":"TWD"}` als UTF-8 und prüft es anhand eines Vertrags. Eine 19-stellige Rechnungs-ID wird als Text gesendet, weil einige Systeme diese Zahl nicht genau speichern können. Daten mit demselben Mitgliedsnamen zweimal werden abgelehnt. Technical concept or control: JSON (JSON). Why it fits: Verwenden Sie JSON für strukturierte Daten, wenn beide Seiten sich auf Feldtypen und darauf einigen, ob `null` erlaubt ist. Sie müssen sich auch auf Zahlenlimits und Versionsregeln einigen. Do not use it when: JSON ist kein Schema. Standard-JSON erlaubt keine Kommentare oder `NaN`, und die Reihenfolge der Objektelemente hat keine Bedeutung. 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): Der Standard deckt nur den aufgeführten Umfang ab. Er wählt nicht den visuellen Stil, die Produktentscheidung oder das Vibulary-Beispiel aus. 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.
Diese Anfrage prüfen
Review how JSON (JSON) is used now. Definition: JSON ist ein Textformat zum Austausch von Daten. Es kann Objekte, Arrays, Text, Zahlen, `true` oder `false` und `null` enthalten. 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, list the evidence, gaps, severity, and the smallest safe fix.