Visual RFC.
ALL RFCs / RFC 7464
Read the RFC ↗
RFC 7464 / JSON TEXT SEQUENCES

Recover after a damaged record

03

A damaged candidate need not end the sequence: a parser should continue at the next record separator.

RFC 7464 · § 2.1EXAMPLE
3 / 3
Recover after a damaged recordA malformed object candidate is lost. This example parser warns, skips to the next RS, ignores consecutive separators and accepts the next complete object; continuing is a SHOULD, not required application policy.Recover at the next RSExample policy: warn and continue (SHOULD)RS{"n":RSRS{"n":2}Invalid JSONskip to RSConsecutive RS:no empty recordparseAccepted: {"n":2} · damaged record lostMissing records make nth-position references unreliable
03
Accept the next complete object.

The second candidate parses successfully. The damaged record is still lost; its position is not a reliable identifier.

Source for this drawing: RFC 7464 · Read RFC section 2.1 ↗

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Terms in this drawing
Resynchronize
Find the next known record boundary after damaged data.
Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

KEY POINT

Report a failure and resynchronize at the next RS.

  • If a candidate fails UTF-8 JSON parsing, the parser SHOULD nonetheless continue with the remaining sequence. It may report the failure; the application might choose to terminate parsing.
  • Multiple consecutive RS bytes do not denote empty elements and can be ignored. Sequence parsers should have an option to warn about truncated JSON texts.
  • Missing or truncated records make position-based references unreliable. The format does not guarantee a reliable nth element, delivery, recovery of missing data or an end-of-sequence signal.
DETAILS

This example policy warns, skips a malformed {"n": candidate, ignores an extra consecutive RS, then accepts {"n":2}. Recovery is the recommended parser behavior, not a promise that every application must continue or that the broken record is reconstructed.

Read the RFC section ↗

All chapters in RFC 7464

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗