Visual RFC.
ALL RFCs / RFC 6901
Read the RFC ↗
RFC 6901 / JSON POINTER

Decode a URI fragment

05

A URI fragment can carry a percent-encoded JSON Pointer only when its media type explicitly defines that interpretation.

RFC 6901 · § 6EXAMPLE
3 / 3
Decode a URI fragmentUnder an explicitly supporting media type, fragment #/c%25d decodes to pointer /c%d. The token c%d then selects value 2. application/json alone does not define these fragment semantics.URI fragment → pointer → valueAssume a media type that supports JSON Pointer fragments#/c%25dFragment representationdecode fragment contentPointer: /c%devaluate token c%dMember c%d → value 2application/json alone does not enable thisRepresentation decoding precedes token evaluation
03
Evaluate the recovered token.

The token c%d selects the exact member with that name. Percent encoding does not change the object member itself.

Source for this drawing: RFC 6901 · Read RFC section 6 ↗

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
URI fragment
The part following # in a URI; its interpretation depends on the media type.
Percent encoding
A percent sign followed by two hexadecimal digits representing one octet.
Related RFCs and changes

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

KEY POINT

A JSON document does not automatically make its URI fragment a pointer.

  • To represent a pointer in a URI fragment, encode it into UTF-8 octets and percent-encode the characters not allowed by the URI fragment syntax.
  • The media type needs to specify JSON Pointer as its fragment identifier syntax explicitly. In particular, application/json does not by itself define JSON Pointer fragment semantics.
  • When interpreting a supported fragment representation, recover the pointer from the percent-encoded fragment before evaluating its tokens. For example, #/c%25d carries /c%d, which selects the object member c%d. The # is the fragment delimiter, not part of the pointer string.
DETAILS

The example document has a member c%d with value 2, and assumes a media type that explicitly supports JSON Pointer fragments. The empty fragment # identifies the root under that assumption; #/ instead addresses an empty-name object member. Pointer ~0/~1 escaping still applies after the representation layer is decoded.

Read the RFC section ↗

All chapters in RFC 6901

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 ↗