mirror of
https://github.com/mudler/LocalAI.git
synced 2024-12-21 13:37:51 +00:00
29 lines
547 B
Go
29 lines
547 B
Go
|
package functions
|
||
|
|
||
|
const (
|
||
|
JSONBNF = `root ::= object
|
||
|
value ::= object | array | string | number | ("true" | "false" | "null") ws
|
||
|
|
||
|
object ::=
|
||
|
"{" ws (
|
||
|
string ":" ws value
|
||
|
("," ws string ":" ws value)*
|
||
|
)? "}" ws
|
||
|
|
||
|
array ::=
|
||
|
"[" ws (
|
||
|
value
|
||
|
("," ws value)*
|
||
|
)? "]" ws
|
||
|
|
||
|
string ::=
|
||
|
"\"" (
|
||
|
[^"\\] |
|
||
|
"\\" (["\\/bfnrt] | "u" [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F] [0-9a-fA-F]) # escapes
|
||
|
)* "\"" ws
|
||
|
|
||
|
number ::= ("-"? ([0-9] | [1-9] [0-9]*)) ("." [0-9]+)? ([eE] [-+]? [0-9]+)? ws
|
||
|
|
||
|
ws ::= ([ \t\n] ws)?`
|
||
|
)
|