How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

ABNF

RFC 5234 defines Augmented Backus-Naur Form, the notation the IETF uses to specify the exact syntax of a protocol element. It is the shared grammar underneath Arazzo runtime expressions, JSONPath, JMESPath and JSON Pointer — the one thing those four otherwise-unrelated addressing schemes have in common.

ABNF is how a specification says precisely what a string is allowed to look like. It is not a format you publish or an artifact you ship — it is the notation inside other specifications, doing the work of turning “a runtime expression looks something like this” into something a parser author and a validator author will independently agree on.

  • Rules, terminals, repetition, alternatives - A small notation: rule = element *(", " element) says as much as a paragraph of careful prose, and says it unambiguously.
  • RFC 7405 added case sensitivity - %s"GET" for case-sensitive, %i for case-insensitive, closing a genuine ambiguity in the original.
  • The thing under the addressing schemes - Arazzo runtime expressions, JSONPath (RFC 9535), JMESPath and JSON Pointer each publish an ABNF grammar. That is the common linkage between four specs people usually discuss as if they were unrelated.

I catalogue it because of where it turned up in my own work. Chasing the difference between expressions, references, queries and pointers, ABNF is the floor I kept hitting — every one of those specs bottoms out in a grammar written in the same notation. Arazzo reaching for a runtime expression syntax instead of $ref was a deliberate move to escape the JSON Schema keyword collision, and the ABNF is what made that escape precise rather than merely different.

Written up in: My Rabbit Warren of JSON Expressions, References, Queries, or Pointers