catalog/rfc8259-json-array.abnf

Source

; <https://www.rfc-editor.org/rfc/rfc8259.html>
; JSON Regular Arrays, a subset of arrays that only have primitives as values (string, number, boolean, null)

array = begin-array [ value *( value-separator value ) ] end-array

begin-array     = ws %x5B ws  ; [ left square bracket

end-array       = ws %x5D ws  ; ] right square bracket

value-separator = ws %x2C ws  ; , comma

ws = *(
        %x20 /              ; Space
        %x09 /              ; Horizontal tab
        %x0A /              ; Line feed or New line
        %x0D )              ; Carriage return

value = false / null / true / number / string

false = %x66.61.6c.73.65   ; false

null  = %x6e.75.6c.6c      ; null

true  = %x74.72.75.65      ; true

key = string

number = [ minus ] int [ frac ] [ exp ]

decimal-point = %x2E       ; .

digit1-9 = %x31-39         ; 1-9

e = %x65 / %x45            ; e E

exp = e [ minus / plus ] 1*DIGIT

frac = decimal-point 1*DIGIT

int = zero / ( digit1-9 *DIGIT )

minus = %x2D               ; -

plus = %x2B                ; +

zero = %x30                ; 0

string = quotation-mark *char quotation-mark

char = unescaped /
    escape (
        %x22 /          ; "    quotation mark  U+0022
        %x5C /          ; \    reverse solidus U+005C
        %x2F /          ; /    solidus         U+002F
        %x62 /          ; b    backspace       U+0008
        %x66 /          ; f    form feed       U+000C
        %x6E /          ; n    line feed       U+000A
        %x72 /          ; r    carriage return U+000D
        %x74 /          ; t    tab             U+0009
        %x75 4HEXDIG )  ; uXXXX                U+XXXX

escape = %x5C              ; \

quotation-mark = %x22      ; "

unescaped = %x20-21 / %x23-5B / %x5D-10FFFF

Info

Rules
array, begin-array, end-array, value-separator, ws, value, false, null, true, key, number, decimal-point, digit1-9, e, exp, frac, int, minus, plus, zero, string, char, escape, quotation-mark, unescaped
Dependencies
Used Builtins
DIGIT, HEXDIG

Alphabet

Cited By

Implementations