forked from leshill/vim-json
-
Notifications
You must be signed in to change notification settings - Fork 111
/
json-test.json
107 lines (97 loc) · 2.17 KB
/
json-test.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// this comment should be highlighted as an error
{
unquotedKeyword:'singleQuotedString',
'singleQuotedKeyword':true,
"decimalCantStartWithPeriod":.1,
"semicolonAtEndOfThisObject":"trailingComma",
};
//even with concealment, strings and numbers & booleans are distinct
{
"string": "this is a string, with a escaped \" inside",
"string": "500",
"NOT a string": 500,
"string": "true",
"NOT a string": true
}
// normative JSON examples from http://json.org/example.html
{"menu": {
"id": "file",
"value": "File",
"popup": {
"menuitem": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
}}
{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986",
"GlossDef": {
"para": "A meta-markup language, used to create markup languages such as DocBook.",
"GlossSeeAlso": ["GML", "XML"]
},
"GlossSee": "markup"
}
}
}
}
}
{"widget": {
"debug": "on",
"window": {
"title": "Sample Konfabulator Widget",
"name": "main_window",
"width": 500,
"height": 500
},
"image": {
"src": "Images/Sun.png",
"name": "sun1",
"hOffset": 250,
"vOffset": 250,
"alignment": "center"
},
"text": {
"data": "Click Here",
"size": 36,
"style": "bold",
"name": "text1",
"hOffset": 250,
"vOffset": 100,
"alignment": "center",
"onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
}
}}
//missing comma errors
{
"object1": "missingComma"
"object2": "value"
}
[
{ "object1": 1 }
{ "object2": 2 }
]
{
"object1": []
"object2": []
}
{
"object1": {}
"object2": []
}
{
"object1": true
"object2": 2
}
//this file is deliberately mis-indented, try gg=G to indent it properly