-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-document-in-relaxed-form.json
31 lines (24 loc) · 1.21 KB
/
example-document-in-relaxed-form.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
* This is an example of a JSON document in a format supported by libujson when parsing in relaxed mode.
*
* C-style comments are allowed and ignored when parsing a JSON document.
* So no comments will be written when using the API to print JSON instances.
*
*/
{
header: "A JSON document in 'relaxed' format.",
note_1: "As you can see, object member names doesn't have "
"to be enclosed by double quotes if they are written "
"in format: [_a-zA-Z][_a-zA-Z0-9]*",
"note_2": "A normal object member name enclosed in double quotes",
note_3: "This is a string value on " // This can be used to
"more than one line that, " // make it more readable.
"when parsed, will be one "
"single long line.",
array: [1,2,3,4,5,6,7,8,9,], // The array definition can end with a separator (,)
// Object member names not in format [_a-zA-Z][_a-zA-Z0-9]* must still be enclosed by double quotes.
"~tilde": "Other value",
// true is a reserved word and if used as an object member name, it must be enclosed by double quotes.
"true": "Some value",
last_object_member: null, // The last object member can end with a separator (,)
}