Search code examples
jsondiagramspecificationsbnf

what is the name of the convention used in this syntax diagram


I found this diagram in the JSON specification:

alt text
(source: json.org)

Where does this diagramming convention come from? Is it just some random convention cooked up by D.C.?


Solution

  • That diagram is known as a syntax diagram or railroad diagram. It's used to visually represent context-free grammars. It's a graphical depiction of the Extended Backus-Naur Form, which is also used to represent context-free grammars.