MatrixWood / minijson

minijson is a mini json parser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

minijson

minijson is a mini json parser

type of JSON number

number = [ "-" ] int [ frac ] [ exp ]
int = "0" / digit1-9 *digit
frac = "." 1*digit
exp = ("e" / "E") ["-" / "+"] 1*digit

type of JSON string

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

type of JSON array

array = %x5B ws [ value *( ws %x2C ws value ) ] ws %x5D

%x5B : [

%x2C : ,

%x5D : ]

ws : whitespace

About

minijson is a mini json parser

License:GNU General Public License v3.0


Languages

Language:C 98.8%Language:CMake 1.2%