@prantlf/jsonlint 11.0.0 → 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -5
- package/lib/cli.js +94 -50
- package/lib/jsonlint.js +13 -0
- package/package.json +26 -18
- package/web/jsonlint.html +3 -3
- package/web/jsonlint.min.js +1 -1
- package/web/jsonlint.min.js.map +1 -1
package/README.md
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
](https://www.npmjs.com/package/@prantlf/jsonlint)
|
|
6
6
|
[](https://codecov.io/gh/prantlf/jsonlint)
|
|
7
7
|
|
|
8
|
-
A [JSON]/CJSON/[JSON5] parser, validator and pretty-printer with a command-line client.
|
|
8
|
+
A [JSON]/CJSON/[JSON5] parser, validator and pretty-printer with a command-line client. See it in action at https://prantlf.github.io/jsonlint/.
|
|
9
9
|
|
|
10
|
-
This is a fork of the original
|
|
10
|
+
This is a fork of the original project ([zaach/jsonlint](https://github.com/zaach/jsonlint)) with the following enhancements:
|
|
11
11
|
|
|
12
12
|
* Handles multiple files on the command line (by Greg Inman).
|
|
13
13
|
* Walks directories recursively (by Paul Vollmer).
|
|
@@ -74,7 +74,7 @@ By default, `jsonlint` will either report a syntax error with details or pretty-
|
|
|
74
74
|
|
|
75
75
|
$ jsonlint -h
|
|
76
76
|
|
|
77
|
-
Usage: jsonlint [options] [<file
|
|
77
|
+
Usage: jsonlint [options] [<file, directory, pattern> ...]
|
|
78
78
|
|
|
79
79
|
JSON parser, syntax and schema validator and pretty-printer.
|
|
80
80
|
|
|
@@ -95,10 +95,14 @@ By default, `jsonlint` will either report a syntax error with details or pretty-
|
|
|
95
95
|
-V, --validate [file] JSON schema file to use for validation
|
|
96
96
|
-e, --environment [env] which specification of JSON Schema the
|
|
97
97
|
validation file uses
|
|
98
|
-
-
|
|
98
|
+
-l, --log-files print only the parsed file names to stdout
|
|
99
|
+
-q, --quiet do not print the parsed json to stdout
|
|
100
|
+
-n, --continue continue with other files if an error occurs
|
|
99
101
|
-p, --pretty-print prettify the input instead of stringifying
|
|
100
102
|
the parsed object
|
|
101
103
|
-P, --pretty-print-invalid force pretty-printing even for invalid input
|
|
104
|
+
-r, --trailing-newline ensure a line break at the end of the output
|
|
105
|
+
-R, --no-trailing-newline ensure no line break at the end of the output
|
|
102
106
|
--prune-comments omit comments from the prettified output
|
|
103
107
|
--strip-object-keys strip quotes from object keys if possible
|
|
104
108
|
(JSON5)
|
|
@@ -110,6 +114,10 @@ By default, `jsonlint` will either report a syntax error with details or pretty-
|
|
|
110
114
|
-v, --version output the version number
|
|
111
115
|
-h, --help output usage information
|
|
112
116
|
|
|
117
|
+
You can use BASH patterns for including and excluding files (only files).
|
|
118
|
+
Patterns are case-sensitive and have to use slashes as a path separators.
|
|
119
|
+
A pattern to exclude from processing starts with "!".
|
|
120
|
+
|
|
113
121
|
Parsing mode can be "cjson" or "json5" to enable other flags automatically.
|
|
114
122
|
If no files or directories are specified, stdin will be parsed. Environments
|
|
115
123
|
for JSON schema validation are "json-schema-draft-04", "json-schema-draft-06"
|
|
@@ -323,7 +331,6 @@ Licensed under the [MIT License].
|
|
|
323
331
|
|
|
324
332
|
[MIT License]: http://en.wikipedia.org/wiki/MIT_License
|
|
325
333
|
[pure JavaScript version]: http://prantlf.github.com/jsonlint/
|
|
326
|
-
[jsonlint.com]: http://jsonlint.com
|
|
327
334
|
[JSON]: https://tools.ietf.org/html/rfc8259
|
|
328
335
|
[JSON5]: https://spec.json5.org
|
|
329
336
|
[JSON Schema]: https://json-schema.org
|
package/lib/cli.js
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
3
|
+
const { readdirSync, readFileSync, statSync, writeFileSync } = require('fs')
|
|
4
|
+
const { extname, join, normalize } = require('path')
|
|
5
|
+
const { isDynamicPattern, sync } = require('fast-glob')
|
|
6
|
+
const { parse, tokenize } = require('./jsonlint')
|
|
7
|
+
const { format } = require('./formatter')
|
|
8
|
+
const { print } = require('./printer')
|
|
9
|
+
const { sortObject } = require('./sorter')
|
|
10
|
+
const { compile } = require('./validator')
|
|
11
|
+
const { description, version } = require('../package')
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
return extension.split(',')
|
|
14
|
-
}
|
|
13
|
+
const collectValues = extension => extension.split(',')
|
|
15
14
|
|
|
16
15
|
const commander = require('commander')
|
|
17
16
|
.name('jsonlint')
|
|
18
|
-
.usage('[options] [<file
|
|
19
|
-
.description(
|
|
17
|
+
.usage('[options] [<file, directory, pattern> ...]')
|
|
18
|
+
.description(description)
|
|
20
19
|
.option('-s, --sort-keys', 'sort object keys (not when prettifying)')
|
|
21
|
-
.option('-E, --extensions [ext]', 'file extensions to process for directory walk',
|
|
20
|
+
.option('-E, --extensions [ext]', 'file extensions to process for directory walk', collectValues, ['json', 'JSON'])
|
|
22
21
|
.option('-i, --in-place', 'overwrite the input files')
|
|
23
22
|
.option('-t, --indent [num|char]', 'number of spaces or specific characters to use for indentation', 2)
|
|
24
23
|
.option('-c, --compact', 'compact error display')
|
|
@@ -29,16 +28,24 @@ const commander = require('commander')
|
|
|
29
28
|
.option('-D, --no-duplicate-keys', 'report duplicate object keys as an error')
|
|
30
29
|
.option('-V, --validate [file]', 'JSON schema file to use for validation')
|
|
31
30
|
.option('-e, --environment [env]', 'which specification of JSON Schema the validation file uses')
|
|
32
|
-
.option('-
|
|
31
|
+
.option('-l, --log-files', 'print only the parsed file names to stdout')
|
|
32
|
+
.option('-q, --quiet', 'do not print the parsed json to stdout')
|
|
33
|
+
.option('-n, --continue', 'continue with other files if an error occurs')
|
|
33
34
|
.option('-p, --pretty-print', 'prettify the input instead of stringifying the parsed object')
|
|
34
35
|
.option('-P, --pretty-print-invalid', 'force pretty-printing even for invalid input')
|
|
36
|
+
.option('-r, --trailing-newline', 'ensure a line break at the end of the output')
|
|
37
|
+
.option('-R, --no-trailing-newline', 'ensure no line break at the end of the output')
|
|
35
38
|
.option('--prune-comments', 'omit comments from the prettified output')
|
|
36
39
|
.option('--strip-object-keys', 'strip quotes from object keys if possible (JSON5)')
|
|
37
40
|
.option('--enforce-double-quotes', 'surrounds all strings with double quotes')
|
|
38
41
|
.option('--enforce-single-quotes', 'surrounds all strings with single quotes (JSON5)')
|
|
39
42
|
.option('--trim-trailing-commas', 'omit trailing commas from objects and arrays (JSON5)')
|
|
40
|
-
.version(
|
|
43
|
+
.version(version, '-v, --version')
|
|
41
44
|
.on('--help', () => {
|
|
45
|
+
console.log()
|
|
46
|
+
console.log('You can use BASH patterns for including and excluding files (only files).')
|
|
47
|
+
console.log('Patterns are case-sensitive and have to use slashes as a path separators.')
|
|
48
|
+
console.log('A pattern to exclude from processing starts with "!".')
|
|
42
49
|
console.log()
|
|
43
50
|
console.log('Parsing mode can be "cjson" or "json5" to enable other flags automatically.')
|
|
44
51
|
console.log('If no files or directories are specified, stdin will be parsed. Environments')
|
|
@@ -48,8 +55,12 @@ const commander = require('commander')
|
|
|
48
55
|
.parse(process.argv)
|
|
49
56
|
|
|
50
57
|
const options = commander.opts()
|
|
58
|
+
const extensions = options.extensions.map(extension => '.' + extension)
|
|
51
59
|
|
|
52
60
|
function logNormalError (error, file) {
|
|
61
|
+
if (process.exitCode > 0) {
|
|
62
|
+
console.log()
|
|
63
|
+
}
|
|
53
64
|
console.log('File:', file)
|
|
54
65
|
console.error(error.message)
|
|
55
66
|
}
|
|
@@ -59,7 +70,7 @@ function logCompactError (error, file) {
|
|
|
59
70
|
', col ' + error.location.start.column + ', ' + error.reason + '.')
|
|
60
71
|
}
|
|
61
72
|
|
|
62
|
-
function
|
|
73
|
+
function processContents (source, file) {
|
|
63
74
|
let parserOptions, parsed, formatted
|
|
64
75
|
try {
|
|
65
76
|
parserOptions = {
|
|
@@ -72,9 +83,9 @@ function parse (source, file) {
|
|
|
72
83
|
if (options.validate) {
|
|
73
84
|
let validate
|
|
74
85
|
try {
|
|
75
|
-
const schema =
|
|
86
|
+
const schema = readFileSync(normalize(options.validate), 'utf8')
|
|
76
87
|
parserOptions.environment = options.environment
|
|
77
|
-
validate =
|
|
88
|
+
validate = compile(schema, parserOptions)
|
|
78
89
|
} catch (error) {
|
|
79
90
|
const message = 'Loading the JSON schema failed: "' +
|
|
80
91
|
options.validate + '".\n' + error.message
|
|
@@ -82,13 +93,13 @@ function parse (source, file) {
|
|
|
82
93
|
}
|
|
83
94
|
parsed = validate(source, parserOptions)
|
|
84
95
|
} else {
|
|
85
|
-
parsed =
|
|
96
|
+
parsed = parse(source, parserOptions)
|
|
86
97
|
}
|
|
87
98
|
if (options.prettyPrint) {
|
|
88
99
|
parserOptions.rawTokens = true
|
|
89
|
-
const tokens =
|
|
100
|
+
const tokens = tokenize(source, parserOptions)
|
|
90
101
|
// TODO: Support sorting tor the tokenized input too.
|
|
91
|
-
return
|
|
102
|
+
return print(tokens, {
|
|
92
103
|
indent: options.indent,
|
|
93
104
|
pruneComments: options.pruneComments,
|
|
94
105
|
stripObjectKeys: options.stripObjectKeys,
|
|
@@ -98,7 +109,7 @@ function parse (source, file) {
|
|
|
98
109
|
})
|
|
99
110
|
}
|
|
100
111
|
if (options.sortKeys) {
|
|
101
|
-
parsed =
|
|
112
|
+
parsed = sortObject(parsed)
|
|
102
113
|
}
|
|
103
114
|
return JSON.stringify(parsed, null, options.indent)
|
|
104
115
|
} catch (e) {
|
|
@@ -109,9 +120,9 @@ function parse (source, file) {
|
|
|
109
120
|
* manual formatter because the automatic one is faster and probably more reliable.
|
|
110
121
|
*/
|
|
111
122
|
try {
|
|
112
|
-
formatted =
|
|
123
|
+
formatted = format(source, options.indent)
|
|
113
124
|
// Re-parse so exception output gets better line numbers
|
|
114
|
-
parsed =
|
|
125
|
+
parsed = parse(formatted)
|
|
115
126
|
} catch (e) {
|
|
116
127
|
if (options.compact) {
|
|
117
128
|
logCompactError(e, file)
|
|
@@ -128,64 +139,97 @@ function parse (source, file) {
|
|
|
128
139
|
logNormalError(e, file)
|
|
129
140
|
}
|
|
130
141
|
}
|
|
131
|
-
|
|
142
|
+
if (options.continue) {
|
|
143
|
+
process.exitCode = 1
|
|
144
|
+
} else {
|
|
145
|
+
process.exit(1)
|
|
146
|
+
}
|
|
132
147
|
}
|
|
133
148
|
}
|
|
134
149
|
|
|
135
150
|
function processFile (file) {
|
|
136
|
-
file =
|
|
137
|
-
|
|
151
|
+
file = normalize(file)
|
|
152
|
+
if (options.logFiles) {
|
|
153
|
+
console.log(file)
|
|
154
|
+
}
|
|
155
|
+
const original = readFileSync(file, 'utf8')
|
|
156
|
+
let source = processContents(original, file)
|
|
138
157
|
if (options.inPlace) {
|
|
139
|
-
|
|
158
|
+
const lines = original.split(/\?r\n/)
|
|
159
|
+
const newLine = !lines[lines.length - 1]
|
|
160
|
+
if (options.trailingNewline === true ||
|
|
161
|
+
(options.trailingNewline !== false && newLine)) {
|
|
162
|
+
source += '\n'
|
|
163
|
+
}
|
|
164
|
+
writeFileSync(file, source)
|
|
140
165
|
} else {
|
|
141
|
-
if (!options.quiet) {
|
|
166
|
+
if (!(options.quiet || options.logFiles)) {
|
|
142
167
|
console.log(source)
|
|
143
168
|
}
|
|
144
169
|
}
|
|
145
170
|
}
|
|
146
171
|
|
|
147
|
-
function
|
|
148
|
-
const extensions = options.extensions.map(function (extension) {
|
|
149
|
-
return '.' + extension
|
|
150
|
-
})
|
|
151
|
-
let srcStat
|
|
172
|
+
function processSource (src, checkExtension) {
|
|
152
173
|
try {
|
|
153
|
-
srcStat =
|
|
174
|
+
const srcStat = statSync(src)
|
|
154
175
|
if (srcStat.isFile()) {
|
|
155
176
|
if (checkExtension) {
|
|
156
|
-
const ext =
|
|
177
|
+
const ext = extname(src)
|
|
157
178
|
if (extensions.indexOf(ext) < 0) {
|
|
158
179
|
return
|
|
159
180
|
}
|
|
160
181
|
}
|
|
161
182
|
processFile(src)
|
|
162
183
|
} else if (srcStat.isDirectory()) {
|
|
163
|
-
const sources =
|
|
164
|
-
for (
|
|
165
|
-
|
|
184
|
+
const sources = readdirSync(src)
|
|
185
|
+
for (const source of sources) {
|
|
186
|
+
processSource(join(src, source), true)
|
|
166
187
|
}
|
|
167
188
|
}
|
|
168
|
-
} catch (
|
|
169
|
-
console.log('WARN',
|
|
189
|
+
} catch ({ message }) {
|
|
190
|
+
console.log('WARN', message)
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function processPatterns (patterns) {
|
|
195
|
+
const files = sync(patterns, { onlyFiles: true })
|
|
196
|
+
if (!files.length) {
|
|
197
|
+
console.log('no files found')
|
|
198
|
+
process.exit(1)
|
|
199
|
+
}
|
|
200
|
+
for (const file of files) {
|
|
201
|
+
try {
|
|
202
|
+
processFile(file)
|
|
203
|
+
} catch ({ message }) {
|
|
204
|
+
console.log('WARN', message)
|
|
205
|
+
}
|
|
170
206
|
}
|
|
171
207
|
}
|
|
172
208
|
|
|
173
209
|
function main () {
|
|
174
|
-
const files = commander
|
|
175
|
-
let source = ''
|
|
210
|
+
const { args: files } = commander
|
|
176
211
|
if (files.length) {
|
|
177
|
-
|
|
178
|
-
|
|
212
|
+
const dynamic = files.some(file => isDynamicPattern(file))
|
|
213
|
+
if (dynamic) {
|
|
214
|
+
processPatterns(files)
|
|
215
|
+
} else {
|
|
216
|
+
for (const file of files) {
|
|
217
|
+
processSource(file, false)
|
|
218
|
+
}
|
|
179
219
|
}
|
|
180
220
|
} else {
|
|
221
|
+
let source = ''
|
|
181
222
|
const stdin = process.openStdin()
|
|
182
223
|
stdin.setEncoding('utf8')
|
|
183
|
-
stdin.on('data',
|
|
224
|
+
stdin.on('data', chunk => {
|
|
184
225
|
source += chunk.toString('utf8')
|
|
185
226
|
})
|
|
186
|
-
stdin.on('end',
|
|
187
|
-
|
|
188
|
-
|
|
227
|
+
stdin.on('end', () => {
|
|
228
|
+
if (options.logFiles) {
|
|
229
|
+
console.log('<stdin>')
|
|
230
|
+
}
|
|
231
|
+
const parsed = processContents(source, '<stdin>')
|
|
232
|
+
if (!(options.quiet || options.logFiles)) {
|
|
189
233
|
console.log(parsed)
|
|
190
234
|
}
|
|
191
235
|
})
|
package/lib/jsonlint.js
CHANGED
|
@@ -775,6 +775,19 @@ function getLineAndColumn (input, offset) {
|
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
777
|
|
|
778
|
+
function getOffset (input, line, column) {
|
|
779
|
+
if (line > 1) {
|
|
780
|
+
const breaks = /\r?\n/g
|
|
781
|
+
let match
|
|
782
|
+
while (match = breaks.exec(input)) { // eslint-disable-line no-cond-assign
|
|
783
|
+
if (--line === 1) {
|
|
784
|
+
return match.index + column
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
return column - 1
|
|
789
|
+
}
|
|
790
|
+
|
|
778
791
|
function pastInput (input, offset) {
|
|
779
792
|
const start = Math.max(0, offset - 20)
|
|
780
793
|
const previous = input.substr(start, offset - start)
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prantlf/jsonlint",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "JSON/CJSON/JSON5 parser, syntax and schema validator and pretty-printer.",
|
|
5
5
|
"author": "Ferdinand Prantl <prantlf@gmail.com> (http://prantl.tk)",
|
|
6
6
|
"contributors": [
|
|
7
|
+
"Ondrej Medek <xmedeko@gmail.com>",
|
|
7
8
|
"Greg Inman <ginman@itriagehealth.com>",
|
|
8
9
|
"Paul Vollmer <mail@paulvollmer.net> (http://paulvollmer.net)",
|
|
9
10
|
"Zach Carter <zach@carter.name> (http://zaa.ch)"
|
|
@@ -58,28 +59,29 @@
|
|
|
58
59
|
"text"
|
|
59
60
|
]
|
|
60
61
|
},
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
"release": {
|
|
63
|
+
"plugins": [
|
|
64
|
+
"@semantic-release/commit-analyzer",
|
|
65
|
+
"@semantic-release/release-notes-generator",
|
|
66
|
+
"@semantic-release/changelog",
|
|
67
|
+
"@semantic-release/npm",
|
|
68
|
+
[
|
|
69
|
+
"@semantic-release/github",
|
|
70
|
+
{
|
|
71
|
+
"failComment": false
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"@semantic-release/git"
|
|
70
75
|
]
|
|
71
76
|
},
|
|
72
|
-
"keywords": [
|
|
73
|
-
"json",
|
|
74
|
-
"validation",
|
|
75
|
-
"lint",
|
|
76
|
-
"jsonlint"
|
|
77
|
-
],
|
|
78
77
|
"dependencies": {
|
|
79
78
|
"ajv": "6.12.6",
|
|
80
|
-
"commander": "9.2.0"
|
|
79
|
+
"commander": "9.2.0",
|
|
80
|
+
"fast-glob": "3.2.11"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
+
"@semantic-release/changelog": "^6.0.1",
|
|
84
|
+
"@semantic-release/git": "^10.0.1",
|
|
83
85
|
"@types/node": "17.0.30",
|
|
84
86
|
"@typescript-eslint/eslint-plugin": "5.21.0",
|
|
85
87
|
"@typescript-eslint/parser": "5.21.0",
|
|
@@ -94,5 +96,11 @@
|
|
|
94
96
|
"terser": "5.13.1",
|
|
95
97
|
"test": "0.6.0",
|
|
96
98
|
"typescript": "4.6.4"
|
|
97
|
-
}
|
|
99
|
+
},
|
|
100
|
+
"keywords": [
|
|
101
|
+
"json",
|
|
102
|
+
"validation",
|
|
103
|
+
"lint",
|
|
104
|
+
"jsonlint"
|
|
105
|
+
]
|
|
98
106
|
}
|
package/web/jsonlint.html
CHANGED
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
<body>
|
|
80
80
|
<header>
|
|
81
81
|
<h1>JSON Lint</h1>
|
|
82
|
-
<p>Enter data and optionally schema in the form below to validate them
|
|
82
|
+
<p>Enter data and optionally schema in the form below to validate them.</p>
|
|
83
83
|
</header>
|
|
84
84
|
<main>
|
|
85
85
|
<section>
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
</div>
|
|
112
112
|
<div>
|
|
113
113
|
<input type="checkbox" checked id="duplicate-object-keys">
|
|
114
|
-
<label for="
|
|
114
|
+
<label for="duplicate-object-keys">Allow duplicate object keys</label>
|
|
115
115
|
</div>
|
|
116
116
|
</div>
|
|
117
117
|
<div>
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
</main>
|
|
180
180
|
<hr>
|
|
181
181
|
<footer>
|
|
182
|
-
<small>Copyright © 2012-
|
|
182
|
+
<small>Copyright © 2012-2022 Zachary Carter, Ferdinand Prantl. See the <a href="https://github.com/prantlf/jsonlint#json-lint">project pages</a> to learn about command-line validation and programmatic usage.</small>
|
|
183
183
|
<!-- See http://tholman.com/github-corners/ -->
|
|
184
184
|
<a href="http://github.com/prantlf/jsonlint" class="github-corner" title="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
|
|
185
185
|
</footer>
|
package/web/jsonlint.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports):typeof define==="function"&&define.amd?define("jsonlint",["exports"],factory):(global=global||self,factory(global.jsonlint={}))})(this,(function(exports){"use strict";const Uni={isWhiteSpace:function isWhiteSpace(x){return x===" "||x===" "||x==="\ufeff"||x>="\t"&&x<="\r"||x===" "||x>=" "&&x<=" "||x==="\u2028"||x==="\u2029"||x===" "||x===" "||x===" "},isWhiteSpaceJSON:function isWhiteSpaceJSON(x){return x===" "||x==="\t"||x==="\n"||x==="\r"},isLineTerminator:function isLineTerminator(x){return x==="\n"||x==="\r"||x==="\u2028"||x==="\u2029"},isLineTerminatorJSON:function isLineTerminatorJSON(x){return x==="\n"||x==="\r"},isIdentifierStart:function isIdentifierStart(x){return x==="$"||x==="_"||x>="A"&&x<="Z"||x>="a"&&x<="z"||x>=""&&Uni.NonAsciiIdentifierStart.test(x)},isIdentifierPart:function isIdentifierPart(x){return x==="$"||x==="_"||x>="A"&&x<="Z"||x>="a"&&x<="z"||x>="0"&&x<="9"||x>=""&&Uni.NonAsciiIdentifierPart.test(x)},NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\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2\u0D02\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/};function isHexDigit(x){return x>="0"&&x<="9"||x>="A"&&x<="F"||x>="a"&&x<="f"}function isOctDigit(x){return x>="0"&&x<="7"}function isDecDigit(x){return x>="0"&&x<="9"}const unescapeMap={"'":"'",'"':'"',"\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v","/":"/"};function parseInternal(input,options){if(typeof input!=="string"||!(input instanceof String)){input=String(input)}const json5=options.mode==="json5";const ignoreComments=options.ignoreComments||options.mode==="cjson"||json5;const ignoreTrailingCommas=options.ignoreTrailingCommas||json5;const allowSingleQuotedStrings=options.allowSingleQuotedStrings||json5;const allowDuplicateObjectKeys=options.allowDuplicateObjectKeys;const reviver=options.reviver;const tokenize=options.tokenize;const rawTokens=options.rawTokens;const tokenLocations=options.tokenLocations;const tokenPaths=options.tokenPaths;const isLineTerminator=json5?Uni.isLineTerminator:Uni.isLineTerminatorJSON;const isWhiteSpace=json5?Uni.isWhiteSpace:Uni.isWhiteSpaceJSON;const inputLength=input.length;let lineNumber=0;let lineStart=0;let position=0;const tokens=[];let startToken;let endToken;let tokenPath;if(tokenize){let tokenOffset=null;let tokenLine;let tokenColumn;startToken=function(){if(tokenOffset!==null)throw Error("internal error, token overlap");tokenLine=lineNumber+1;tokenColumn=position-lineStart+1;tokenOffset=position};endToken=function(type,value){if(tokenOffset!==position){const token={type:type};if(rawTokens){token.raw=input.substr(tokenOffset,position-tokenOffset)}if(value!==undefined){token.value=value}if(tokenLocations){token.location={start:{column:tokenColumn,line:tokenLine,offset:tokenOffset}}}if(tokenPaths){token.path=tokenPath.slice()}tokens.push(token)}tokenOffset=null;return value};tokenPaths&&(tokenPath=[])}function generateMessage(){let message;if(position<inputLength){const token=JSON.stringify(input[position]);message="Unexpected token "+token}else{message="Unexpected end of input"}return message}function createError(message){const column=position-lineStart+1;++lineNumber;const texts=getTexts(message,input,position,lineNumber,column);const error=SyntaxError(texts.message);error.reason=message;error.excerpt=texts.excerpt;error.pointer=texts.pointer;error.location={start:{column:column,line:lineNumber,offset:position}};return error}function fail(message){if(!message){message=generateMessage()}const error=createError(message);throw error}function newLine(char){if(char==="\r"&&input[position]==="\n"){++position}lineStart=position;++lineNumber}function parseGeneric(){if(position<inputLength){startToken&&startToken();const char=input[position++];if(char==='"'||char==="'"&&allowSingleQuotedStrings){const string=parseString(char);endToken&&endToken("literal",string);return string}else if(char==="{"){endToken&&endToken("symbol","{");return parseObject()}else if(char==="["){endToken&&endToken("symbol","[");return parseArray()}else if(char==="-"||char==="."||isDecDigit(char)||json5&&(char==="+"||char==="I"||char==="N")){const number=parseNumber();endToken&&endToken("literal",number);return number}else if(char==="n"){parseKeyword("null");endToken&&endToken("literal",null);return null}else if(char==="t"){parseKeyword("true");endToken&&endToken("literal",true);return true}else if(char==="f"){parseKeyword("false");endToken&&endToken("literal",false);return false}else{--position;endToken&&endToken();return undefined}}}function parseKey(){let result;if(position<inputLength){startToken&&startToken();const char=input[position++];if(char==='"'||char==="'"&&allowSingleQuotedStrings){const string=parseString(char);endToken&&endToken("literal",string);return string}else if(char==="{"){endToken&&endToken("symbol","{");return parseObject()}else if(char==="["){endToken&&endToken("symbol","[");return parseArray()}else if(char==="."||isDecDigit(char)){const number=parseNumber(true);endToken&&endToken("literal",number);return number}else if(json5&&Uni.isIdentifierStart(char)||char==="\\"&&input[position]==="u"){const rollback=position-1;result=parseIdentifier();if(result===undefined){position=rollback;endToken&&endToken();return undefined}else{endToken&&endToken("literal",result);return result}}else{--position;endToken&&endToken();return undefined}}}function skipWhiteSpace(){let insideWhiteSpace;function startWhiteSpace(){if(!insideWhiteSpace){insideWhiteSpace=true;--position;startToken();++position}}function endWhiteSpace(){if(insideWhiteSpace){insideWhiteSpace=false;endToken("whitespace")}}while(position<inputLength){const char=input[position++];if(isLineTerminator(char)){startToken&&startWhiteSpace();newLine(char)}else if(isWhiteSpace(char)){startToken&&startWhiteSpace()}else if(char==="/"&&ignoreComments&&(input[position]==="/"||input[position]==="*")){if(startToken){--position;endWhiteSpace();startToken();++position}skipComment(input[position++]==="*");endToken&&endToken("comment")}else{--position;break}}endToken&&endWhiteSpace()}function skipComment(multiLine){while(position<inputLength){const char=input[position++];if(isLineTerminator(char)){if(!multiLine){--position;return}newLine(char)}else if(char==="*"&&multiLine){if(input[position]==="/"){++position;return}}else{}}if(multiLine){fail("Unclosed multiline comment")}}function parseKeyword(keyword){const startPosition=position;for(let i=1,keywordLength=keyword.length;i<keywordLength;++i){if(position>=inputLength||keyword[i]!==input[position]){position=startPosition-1;fail()}++position}}function parseObject(){const result={};const emptyObject={};let isNotEmpty=false;while(position<inputLength){skipWhiteSpace();const key=parseKey();if(allowDuplicateObjectKeys===false&&result[key]){fail('Duplicate key: "'+key+'"')}skipWhiteSpace();startToken&&startToken();let char=input[position++];endToken&&endToken("symbol",char);if(char==="}"&&key===undefined){if(!ignoreTrailingCommas&&isNotEmpty){--position;fail("Trailing comma in object")}return result}else if(char===":"&&key!==undefined){skipWhiteSpace();tokenPath&&tokenPath.push(key);let value=parseGeneric();tokenPath&&tokenPath.pop();if(value===undefined)fail('No value found for key "'+key+'"');if(typeof key!=="string"){if(!json5||typeof key!=="number"){fail('Wrong key type: "'+key+'"')}}if(key in emptyObject||emptyObject[key]!=null){}else{if(reviver){value=reviver(key,value)}if(value!==undefined){isNotEmpty=true;result[key]=value}}skipWhiteSpace();startToken&&startToken();char=input[position++];endToken&&endToken("symbol",char);if(char===","){continue}else if(char==="}"){return result}else{fail()}}else{--position;fail()}}fail()}function parseArray(){const result=[];while(position<inputLength){skipWhiteSpace();tokenPath&&tokenPath.push(result.length);let item=parseGeneric();tokenPath&&tokenPath.pop();skipWhiteSpace();startToken&&startToken();const char=input[position++];endToken&&endToken("symbol",char);if(item!==undefined){if(reviver){item=reviver(String(result.length),item)}if(item===undefined){++result.length;item=true}else{result.push(item)}}if(char===","){if(item===undefined){fail("Elisions are not supported")}}else if(char==="]"){if(!ignoreTrailingCommas&&item===undefined&&result.length){--position;fail("Trailing comma in array")}return result}else{--position;fail()}}}function parseNumber(){--position;let start=position;let char=input[position++];const toNumber=function(isOctal){const string=input.substr(start,position-start);let result;if(isOctal){result=parseInt(string.replace(/^0o?/,""),8)}else{result=Number(string)}if(Number.isNaN(result)){--position;fail('Bad numeric literal - "'+input.substr(start,position-start+1)+'"')}else if(!json5&&!string.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)){--position;fail('Non-json numeric literal - "'+input.substr(start,position-start+1)+'"')}else{return result}};if(char==="-"||char==="+"&&json5){char=input[position++]}if(char==="N"&&json5){parseKeyword("NaN");return NaN}if(char==="I"&&json5){parseKeyword("Infinity");return toNumber()}if(char>="1"&&char<="9"){while(position<inputLength&&isDecDigit(input[position])){++position}char=input[position++]}if(char==="0"){char=input[position++];const isOctal=char==="o"||char==="O"||isOctDigit(char);const isHex=char==="x"||char==="X";if(json5&&(isOctal||isHex)){while(position<inputLength&&(isHex?isHexDigit:isOctDigit)(input[position])){++position}let sign=1;if(input[start]==="-"){sign=-1;++start}else if(input[start]==="+"){++start}return sign*toNumber(isOctal)}}if(char==="."){while(position<inputLength&&isDecDigit(input[position])){++position}char=input[position++]}if(char==="e"||char==="E"){char=input[position++];if(char==="-"||char==="+"){++position}while(position<inputLength&&isDecDigit(input[position])){++position}char=input[position++]}--position;return toNumber()}function parseIdentifier(){--position;let result="";while(position<inputLength){let char=input[position++];if(char==="\\"&&input[position]==="u"&&isHexDigit(input[position+1])&&isHexDigit(input[position+2])&&isHexDigit(input[position+3])&&isHexDigit(input[position+4])){char=String.fromCharCode(parseInt(input.substr(position+1,4),16));position+=5}if(result.length){if(Uni.isIdentifierPart(char)){result+=char}else{--position;return result}}else{if(Uni.isIdentifierStart(char)){result+=char}else{return undefined}}}fail()}function parseString(endChar){let result="";while(position<inputLength){let char=input[position++];if(char===endChar){return result}else if(char==="\\"){if(position>=inputLength){fail()}char=input[position++];if(unescapeMap[char]&&(json5||char!=="v"&&(char!=="'"||allowSingleQuotedStrings))){result+=unescapeMap[char]}else if(json5&&isLineTerminator(char)){newLine(char)}else if(char==="u"||char==="x"&&json5){const count=char==="u"?4:2;for(let i=0;i<count;++i){if(position>=inputLength){fail()}if(!isHexDigit(input[position])){fail("Bad escape sequence")}position++}result+=String.fromCharCode(parseInt(input.substr(position-count,count),16))}else if(json5&&isOctDigit(char)){let digits;if(char<"4"&&isOctDigit(input[position])&&isOctDigit(input[position+1])){digits=3}else if(isOctDigit(input[position])){digits=2}else{digits=1}position+=digits-1;result+=String.fromCharCode(parseInt(input.substr(position-digits,digits),8))}else if(json5){result+=char}else{--position;fail()}}else if(isLineTerminator(char)){fail()}else{if(!json5&&char.charCodeAt(0)<32){--position;fail("Unexpected control character")}result+=char}}fail()}skipWhiteSpace();let returnValue=parseGeneric();if(returnValue!==undefined||position<inputLength){skipWhiteSpace();if(position>=inputLength){if(reviver){returnValue=reviver("",returnValue)}return tokenize?tokens:returnValue}else{fail()}}else{if(position){fail("No data, only a whitespace")}else{fail("No data, empty input")}}}function parseCustom(input,options){if(typeof options==="function"){options={reviver:options}}else if(!options){options={}}return parseInternal(input,options)}function tokenize(input,options){if(!options){options={}}const oldTokenize=options.tokenize;options.tokenize=true;const tokens=parseInternal(input,options);options.tokenize=oldTokenize;return tokens}function escapePointerToken(token){return token.toString().replace(/~/g,"~0").replace(/\//g,"~1")}function pathToPointer(tokens){if(tokens.length===0){return""}return"/"+tokens.map(escapePointerToken).join("/")}function unescapePointerToken(token){return token.replace(/~1/g,"/").replace(/~0/g,"~")}function pointerToPath(pointer){if(pointer===""){return[]}if(pointer[0]!=="/"){throw new Error('Missing initial "/" in the reference')}return pointer.substr(1).split("/").map(unescapePointerToken)}function getLineAndColumn(input,offset){const lines=input.substr(0,offset).split(/\r?\n/);const line=lines.length;const column=lines[line-1].length+1;return{line:line,column:column}}function pastInput(input,offset){const start=Math.max(0,offset-20);const previous=input.substr(start,offset-start);return(offset>20?"...":"")+previous.replace(/\r?\n/g,"")}function upcomingInput(input,offset){let start=Math.max(0,offset-20);start+=offset-start;const rest=input.length-start;const next=input.substr(start,Math.min(20,rest));return next.replace(/\r?\n/g,"")+(rest>20?"...":"")}function getPositionContext(input,offset){const past=pastInput(input,offset);const upcoming=upcomingInput(input,offset);const pointer=new Array(past.length+1).join("-")+"^";return{excerpt:past+upcoming,pointer:pointer}}function getReason(error){let message=error.message.replace("JSON.parse: ","").replace("JSON Parse error: ","");const firstCharacter=message.charAt(0);if(firstCharacter>="a"){message=firstCharacter.toUpperCase()+message.substr(1)}return message}function getLocationOnV8(input,reason){const match=/ in JSON at position (\d+)$/.exec(reason);if(match){const offset=+match[1];const location=getLineAndColumn(input,offset);return{offset:offset,line:location.line,column:location.column,reason:reason.substr(0,match.index)}}}function checkUnexpectedEndOnV8(input,reason){const match=/ end of JSON input$/.exec(reason);if(match){const offset=input.length;const location=getLineAndColumn(input,offset);return{offset:offset,line:location.line,column:location.column,reason:reason.substr(0,match.index+4)}}}function getLocationOnSpiderMonkey(input,reason){const match=/ at line (\d+) column (\d+) of the JSON data$/.exec(reason);if(match){const line=+match[1];const column=+match[2];const offset=getOffset(input,line,column);return{offset:offset,line:line,column:column,reason:reason.substr(0,match.index)}}}function getTexts(reason,input,offset,line,column){const position=getPositionContext(input,offset);const excerpt=position.excerpt;let message,pointer;if(typeof line==="number"){pointer=position.pointer;message="Parse error on line "+line+", column "+column+":\n"+excerpt+"\n"+pointer+"\n"+reason}else{message="Parse error in JSON input:\n"+excerpt+"\n"+reason}return{message:message,excerpt:excerpt,pointer:pointer}}function improveNativeError(input,error){let reason=getReason(error);const location=getLocationOnV8(input,reason)||checkUnexpectedEndOnV8(input,reason)||getLocationOnSpiderMonkey(input,reason);let offset,line,column;if(location){offset=location.offset;line=location.line;column=location.column;reason=location.reason}else{offset=0}error.reason=reason;const texts=getTexts(reason,input,offset,line,column);error.message=texts.message;error.excerpt=texts.excerpt;if(texts.pointer){error.pointer=texts.pointer;error.location={start:{column:column,line:line,offset:offset}}}return error}function parseNative(input,reviver){try{return JSON.parse(input,reviver)}catch(error){throw improveNativeError(input,error)}}const isSafari=typeof navigator!=="undefined"&&/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor);const oldNode=typeof process!=="undefined"&&process.version.startsWith("v4.");function needsCustomParser(options){return options.ignoreComments||options.ignoreTrailingCommas||options.allowSingleQuotedStrings||options.allowDuplicateObjectKeys===false||options.mode==="cjson"||options.mode==="json5"||isSafari||oldNode}function getReviver(options){if(typeof options==="function"){return options}else if(options){return options.reviver}}function parse(input,options){options||(options={});return needsCustomParser(options)?parseCustom(input,options):parseNative(input,getReviver(options))}exports.parse=parse;exports.tokenize=tokenize;exports.pathToPointer=pathToPointer;exports.pointerToPath=pointerToPath;exports.parseNative=parseNative;exports.parseCustom=parseCustom;exports.getErrorTexts=getTexts;Object.defineProperty(exports,"__esModule",{value:true})}));
|
|
1
|
+
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports):typeof define==="function"&&define.amd?define("jsonlint",["exports"],factory):(global=global||self,factory(global.jsonlint={}))})(this,(function(exports){"use strict";const Uni={isWhiteSpace:function isWhiteSpace(x){return x===" "||x===" "||x==="\ufeff"||x>="\t"&&x<="\r"||x===" "||x>=" "&&x<=" "||x==="\u2028"||x==="\u2029"||x===" "||x===" "||x===" "},isWhiteSpaceJSON:function isWhiteSpaceJSON(x){return x===" "||x==="\t"||x==="\n"||x==="\r"},isLineTerminator:function isLineTerminator(x){return x==="\n"||x==="\r"||x==="\u2028"||x==="\u2029"},isLineTerminatorJSON:function isLineTerminatorJSON(x){return x==="\n"||x==="\r"},isIdentifierStart:function isIdentifierStart(x){return x==="$"||x==="_"||x>="A"&&x<="Z"||x>="a"&&x<="z"||x>=""&&Uni.NonAsciiIdentifierStart.test(x)},isIdentifierPart:function isIdentifierPart(x){return x==="$"||x==="_"||x>="A"&&x<="Z"||x>="a"&&x<="z"||x>="0"&&x<="9"||x>=""&&Uni.NonAsciiIdentifierPart.test(x)},NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0\u08A2-\u08AC\u08E4-\u08FE\u0900-\u0963\u0966-\u096F\u0971-\u0977\u0979-\u097F\u0981-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0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\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F0\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191C\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1D00-\u1DE6\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA697\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7B\uAA80-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE26\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/};function isHexDigit(x){return x>="0"&&x<="9"||x>="A"&&x<="F"||x>="a"&&x<="f"}function isOctDigit(x){return x>="0"&&x<="7"}function isDecDigit(x){return x>="0"&&x<="9"}const unescapeMap={"'":"'",'"':'"',"\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v","/":"/"};function parseInternal(input,options){if(typeof input!=="string"||!(input instanceof String)){input=String(input)}const json5=options.mode==="json5";const ignoreComments=options.ignoreComments||options.mode==="cjson"||json5;const ignoreTrailingCommas=options.ignoreTrailingCommas||json5;const allowSingleQuotedStrings=options.allowSingleQuotedStrings||json5;const allowDuplicateObjectKeys=options.allowDuplicateObjectKeys;const reviver=options.reviver;const tokenize=options.tokenize;const rawTokens=options.rawTokens;const tokenLocations=options.tokenLocations;const tokenPaths=options.tokenPaths;const isLineTerminator=json5?Uni.isLineTerminator:Uni.isLineTerminatorJSON;const isWhiteSpace=json5?Uni.isWhiteSpace:Uni.isWhiteSpaceJSON;const inputLength=input.length;let lineNumber=0;let lineStart=0;let position=0;const tokens=[];let startToken;let endToken;let tokenPath;if(tokenize){let tokenOffset=null;let tokenLine;let tokenColumn;startToken=function(){if(tokenOffset!==null)throw Error("internal error, token overlap");tokenLine=lineNumber+1;tokenColumn=position-lineStart+1;tokenOffset=position};endToken=function(type,value){if(tokenOffset!==position){const token={type:type};if(rawTokens){token.raw=input.substr(tokenOffset,position-tokenOffset)}if(value!==undefined){token.value=value}if(tokenLocations){token.location={start:{column:tokenColumn,line:tokenLine,offset:tokenOffset}}}if(tokenPaths){token.path=tokenPath.slice()}tokens.push(token)}tokenOffset=null;return value};tokenPaths&&(tokenPath=[])}function generateMessage(){let message;if(position<inputLength){const token=JSON.stringify(input[position]);message="Unexpected token "+token}else{message="Unexpected end of input"}return message}function createError(message){const column=position-lineStart+1;++lineNumber;const texts=getTexts(message,input,position,lineNumber,column);const error=SyntaxError(texts.message);error.reason=message;error.excerpt=texts.excerpt;error.pointer=texts.pointer;error.location={start:{column:column,line:lineNumber,offset:position}};return error}function fail(message){if(!message){message=generateMessage()}const error=createError(message);throw error}function newLine(char){if(char==="\r"&&input[position]==="\n"){++position}lineStart=position;++lineNumber}function parseGeneric(){if(position<inputLength){startToken&&startToken();const char=input[position++];if(char==='"'||char==="'"&&allowSingleQuotedStrings){const string=parseString(char);endToken&&endToken("literal",string);return string}else if(char==="{"){endToken&&endToken("symbol","{");return parseObject()}else if(char==="["){endToken&&endToken("symbol","[");return parseArray()}else if(char==="-"||char==="."||isDecDigit(char)||json5&&(char==="+"||char==="I"||char==="N")){const number=parseNumber();endToken&&endToken("literal",number);return number}else if(char==="n"){parseKeyword("null");endToken&&endToken("literal",null);return null}else if(char==="t"){parseKeyword("true");endToken&&endToken("literal",true);return true}else if(char==="f"){parseKeyword("false");endToken&&endToken("literal",false);return false}else{--position;endToken&&endToken();return undefined}}}function parseKey(){let result;if(position<inputLength){startToken&&startToken();const char=input[position++];if(char==='"'||char==="'"&&allowSingleQuotedStrings){const string=parseString(char);endToken&&endToken("literal",string);return string}else if(char==="{"){endToken&&endToken("symbol","{");return parseObject()}else if(char==="["){endToken&&endToken("symbol","[");return parseArray()}else if(char==="."||isDecDigit(char)){const number=parseNumber(true);endToken&&endToken("literal",number);return number}else if(json5&&Uni.isIdentifierStart(char)||char==="\\"&&input[position]==="u"){const rollback=position-1;result=parseIdentifier();if(result===undefined){position=rollback;endToken&&endToken();return undefined}else{endToken&&endToken("literal",result);return result}}else{--position;endToken&&endToken();return undefined}}}function skipWhiteSpace(){let insideWhiteSpace;function startWhiteSpace(){if(!insideWhiteSpace){insideWhiteSpace=true;--position;startToken();++position}}function endWhiteSpace(){if(insideWhiteSpace){insideWhiteSpace=false;endToken("whitespace")}}while(position<inputLength){const char=input[position++];if(isLineTerminator(char)){startToken&&startWhiteSpace();newLine(char)}else if(isWhiteSpace(char)){startToken&&startWhiteSpace()}else if(char==="/"&&ignoreComments&&(input[position]==="/"||input[position]==="*")){if(startToken){--position;endWhiteSpace();startToken();++position}skipComment(input[position++]==="*");endToken&&endToken("comment")}else{--position;break}}endToken&&endWhiteSpace()}function skipComment(multiLine){while(position<inputLength){const char=input[position++];if(isLineTerminator(char)){if(!multiLine){--position;return}newLine(char)}else if(char==="*"&&multiLine){if(input[position]==="/"){++position;return}}else{}}if(multiLine){fail("Unclosed multiline comment")}}function parseKeyword(keyword){const startPosition=position;for(let i=1,keywordLength=keyword.length;i<keywordLength;++i){if(position>=inputLength||keyword[i]!==input[position]){position=startPosition-1;fail()}++position}}function parseObject(){const result={};const emptyObject={};let isNotEmpty=false;while(position<inputLength){skipWhiteSpace();const key=parseKey();if(allowDuplicateObjectKeys===false&&result[key]){fail('Duplicate key: "'+key+'"')}skipWhiteSpace();startToken&&startToken();let char=input[position++];endToken&&endToken("symbol",char);if(char==="}"&&key===undefined){if(!ignoreTrailingCommas&&isNotEmpty){--position;fail("Trailing comma in object")}return result}else if(char===":"&&key!==undefined){skipWhiteSpace();tokenPath&&tokenPath.push(key);let value=parseGeneric();tokenPath&&tokenPath.pop();if(value===undefined)fail('No value found for key "'+key+'"');if(typeof key!=="string"){if(!json5||typeof key!=="number"){fail('Wrong key type: "'+key+'"')}}if(key in emptyObject||emptyObject[key]!=null){}else{if(reviver){value=reviver(key,value)}if(value!==undefined){isNotEmpty=true;result[key]=value}}skipWhiteSpace();startToken&&startToken();char=input[position++];endToken&&endToken("symbol",char);if(char===","){continue}else if(char==="}"){return result}else{fail()}}else{--position;fail()}}fail()}function parseArray(){const result=[];while(position<inputLength){skipWhiteSpace();tokenPath&&tokenPath.push(result.length);let item=parseGeneric();tokenPath&&tokenPath.pop();skipWhiteSpace();startToken&&startToken();const char=input[position++];endToken&&endToken("symbol",char);if(item!==undefined){if(reviver){item=reviver(String(result.length),item)}if(item===undefined){++result.length;item=true}else{result.push(item)}}if(char===","){if(item===undefined){fail("Elisions are not supported")}}else if(char==="]"){if(!ignoreTrailingCommas&&item===undefined&&result.length){--position;fail("Trailing comma in array")}return result}else{--position;fail()}}}function parseNumber(){--position;let start=position;let char=input[position++];const toNumber=function(isOctal){const string=input.substr(start,position-start);let result;if(isOctal){result=parseInt(string.replace(/^0o?/,""),8)}else{result=Number(string)}if(Number.isNaN(result)){--position;fail('Bad numeric literal - "'+input.substr(start,position-start+1)+'"')}else if(!json5&&!string.match(/^-?(0|[1-9][0-9]*)(\.[0-9]+)?(e[+-]?[0-9]+)?$/i)){--position;fail('Non-json numeric literal - "'+input.substr(start,position-start+1)+'"')}else{return result}};if(char==="-"||char==="+"&&json5){char=input[position++]}if(char==="N"&&json5){parseKeyword("NaN");return NaN}if(char==="I"&&json5){parseKeyword("Infinity");return toNumber()}if(char>="1"&&char<="9"){while(position<inputLength&&isDecDigit(input[position])){++position}char=input[position++]}if(char==="0"){char=input[position++];const isOctal=char==="o"||char==="O"||isOctDigit(char);const isHex=char==="x"||char==="X";if(json5&&(isOctal||isHex)){while(position<inputLength&&(isHex?isHexDigit:isOctDigit)(input[position])){++position}let sign=1;if(input[start]==="-"){sign=-1;++start}else if(input[start]==="+"){++start}return sign*toNumber(isOctal)}}if(char==="."){while(position<inputLength&&isDecDigit(input[position])){++position}char=input[position++]}if(char==="e"||char==="E"){char=input[position++];if(char==="-"||char==="+"){++position}while(position<inputLength&&isDecDigit(input[position])){++position}char=input[position++]}--position;return toNumber()}function parseIdentifier(){--position;let result="";while(position<inputLength){let char=input[position++];if(char==="\\"&&input[position]==="u"&&isHexDigit(input[position+1])&&isHexDigit(input[position+2])&&isHexDigit(input[position+3])&&isHexDigit(input[position+4])){char=String.fromCharCode(parseInt(input.substr(position+1,4),16));position+=5}if(result.length){if(Uni.isIdentifierPart(char)){result+=char}else{--position;return result}}else{if(Uni.isIdentifierStart(char)){result+=char}else{return undefined}}}fail()}function parseString(endChar){let result="";while(position<inputLength){let char=input[position++];if(char===endChar){return result}else if(char==="\\"){if(position>=inputLength){fail()}char=input[position++];if(unescapeMap[char]&&(json5||char!=="v"&&(char!=="'"||allowSingleQuotedStrings))){result+=unescapeMap[char]}else if(json5&&isLineTerminator(char)){newLine(char)}else if(char==="u"||char==="x"&&json5){const count=char==="u"?4:2;for(let i=0;i<count;++i){if(position>=inputLength){fail()}if(!isHexDigit(input[position])){fail("Bad escape sequence")}position++}result+=String.fromCharCode(parseInt(input.substr(position-count,count),16))}else if(json5&&isOctDigit(char)){let digits;if(char<"4"&&isOctDigit(input[position])&&isOctDigit(input[position+1])){digits=3}else if(isOctDigit(input[position])){digits=2}else{digits=1}position+=digits-1;result+=String.fromCharCode(parseInt(input.substr(position-digits,digits),8))}else if(json5){result+=char}else{--position;fail()}}else if(isLineTerminator(char)){fail()}else{if(!json5&&char.charCodeAt(0)<32){--position;fail("Unexpected control character")}result+=char}}fail()}skipWhiteSpace();let returnValue=parseGeneric();if(returnValue!==undefined||position<inputLength){skipWhiteSpace();if(position>=inputLength){if(reviver){returnValue=reviver("",returnValue)}return tokenize?tokens:returnValue}else{fail()}}else{if(position){fail("No data, only a whitespace")}else{fail("No data, empty input")}}}function parseCustom(input,options){if(typeof options==="function"){options={reviver:options}}else if(!options){options={}}return parseInternal(input,options)}function tokenize(input,options){if(!options){options={}}const oldTokenize=options.tokenize;options.tokenize=true;const tokens=parseInternal(input,options);options.tokenize=oldTokenize;return tokens}function escapePointerToken(token){return token.toString().replace(/~/g,"~0").replace(/\//g,"~1")}function pathToPointer(tokens){if(tokens.length===0){return""}return"/"+tokens.map(escapePointerToken).join("/")}function unescapePointerToken(token){return token.replace(/~1/g,"/").replace(/~0/g,"~")}function pointerToPath(pointer){if(pointer===""){return[]}if(pointer[0]!=="/"){throw new Error('Missing initial "/" in the reference')}return pointer.substr(1).split("/").map(unescapePointerToken)}function getLineAndColumn(input,offset){const lines=input.substr(0,offset).split(/\r?\n/);const line=lines.length;const column=lines[line-1].length+1;return{line:line,column:column}}function getOffset(input,line,column){if(line>1){const breaks=/\r?\n/g;let match;while(match=breaks.exec(input)){if(--line===1){return match.index+column}}}return column-1}function pastInput(input,offset){const start=Math.max(0,offset-20);const previous=input.substr(start,offset-start);return(offset>20?"...":"")+previous.replace(/\r?\n/g,"")}function upcomingInput(input,offset){let start=Math.max(0,offset-20);start+=offset-start;const rest=input.length-start;const next=input.substr(start,Math.min(20,rest));return next.replace(/\r?\n/g,"")+(rest>20?"...":"")}function getPositionContext(input,offset){const past=pastInput(input,offset);const upcoming=upcomingInput(input,offset);const pointer=new Array(past.length+1).join("-")+"^";return{excerpt:past+upcoming,pointer:pointer}}function getReason(error){let message=error.message.replace("JSON.parse: ","").replace("JSON Parse error: ","");const firstCharacter=message.charAt(0);if(firstCharacter>="a"){message=firstCharacter.toUpperCase()+message.substr(1)}return message}function getLocationOnV8(input,reason){const match=/ in JSON at position (\d+)$/.exec(reason);if(match){const offset=+match[1];const location=getLineAndColumn(input,offset);return{offset:offset,line:location.line,column:location.column,reason:reason.substr(0,match.index)}}}function checkUnexpectedEndOnV8(input,reason){const match=/ end of JSON input$/.exec(reason);if(match){const offset=input.length;const location=getLineAndColumn(input,offset);return{offset:offset,line:location.line,column:location.column,reason:reason.substr(0,match.index+4)}}}function getLocationOnSpiderMonkey(input,reason){const match=/ at line (\d+) column (\d+) of the JSON data$/.exec(reason);if(match){const line=+match[1];const column=+match[2];const offset=getOffset(input,line,column);return{offset:offset,line:line,column:column,reason:reason.substr(0,match.index)}}}function getTexts(reason,input,offset,line,column){const position=getPositionContext(input,offset);const excerpt=position.excerpt;let message,pointer;if(typeof line==="number"){pointer=position.pointer;message="Parse error on line "+line+", column "+column+":\n"+excerpt+"\n"+pointer+"\n"+reason}else{message="Parse error in JSON input:\n"+excerpt+"\n"+reason}return{message:message,excerpt:excerpt,pointer:pointer}}function improveNativeError(input,error){let reason=getReason(error);const location=getLocationOnV8(input,reason)||checkUnexpectedEndOnV8(input,reason)||getLocationOnSpiderMonkey(input,reason);let offset,line,column;if(location){offset=location.offset;line=location.line;column=location.column;reason=location.reason}else{offset=0}error.reason=reason;const texts=getTexts(reason,input,offset,line,column);error.message=texts.message;error.excerpt=texts.excerpt;if(texts.pointer){error.pointer=texts.pointer;error.location={start:{column:column,line:line,offset:offset}}}return error}function parseNative(input,reviver){try{return JSON.parse(input,reviver)}catch(error){throw improveNativeError(input,error)}}const isSafari=typeof navigator!=="undefined"&&/Safari/.test(navigator.userAgent)&&/Apple Computer/.test(navigator.vendor);const oldNode=typeof process!=="undefined"&&process.version.startsWith("v4.");function needsCustomParser(options){return options.ignoreComments||options.ignoreTrailingCommas||options.allowSingleQuotedStrings||options.allowDuplicateObjectKeys===false||options.mode==="cjson"||options.mode==="json5"||isSafari||oldNode}function getReviver(options){if(typeof options==="function"){return options}else if(options){return options.reviver}}function parse(input,options){options||(options={});return needsCustomParser(options)?parseCustom(input,options):parseNative(input,getReviver(options))}exports.parse=parse;exports.tokenize=tokenize;exports.pathToPointer=pathToPointer;exports.pointerToPath=pointerToPath;exports.parseNative=parseNative;exports.parseCustom=parseCustom;exports.getErrorTexts=getTexts;Object.defineProperty(exports,"__esModule",{value:true})}));
|
|
2
2
|
//# sourceMappingURL=jsonlint.min.js.map
|
package/web/jsonlint.min.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["lib/jsonlint.js"],"names":["global","factory","exports","module","define","amd","self","jsonlint","this","Uni","isWhiteSpace","x","isWhiteSpaceJSON","isLineTerminator","isLineTerminatorJSON","isIdentifierStart","NonAsciiIdentifierStart","test","isIdentifierPart","NonAsciiIdentifierPart","isHexDigit","isOctDigit","isDecDigit","unescapeMap","b","f","n","r","t","v","parseInternal","input","options","String","json5","mode","ignoreComments","ignoreTrailingCommas","allowSingleQuotedStrings","allowDuplicateObjectKeys","reviver","tokenize","rawTokens","tokenLocations","tokenPaths","inputLength","length","lineNumber","lineStart","position","tokens","startToken","endToken","tokenPath","tokenOffset","tokenLine","tokenColumn","Error","type","value","token","raw","substr","undefined","location","start","column","line","offset","path","slice","push","generateMessage","message","JSON","stringify","createError","texts","getTexts","error","SyntaxError","reason","excerpt","pointer","fail","newLine","char","parseGeneric","string","parseString","parseObject","parseArray","number","parseNumber","parseKeyword","parseKey","result","rollback","parseIdentifier","skipWhiteSpace","insideWhiteSpace","startWhiteSpace","endWhiteSpace","skipComment","multiLine","keyword","startPosition","i","keywordLength","emptyObject","isNotEmpty","key","pop","item","toNumber","isOctal","parseInt","replace","Number","isNaN","match","NaN","isHex","sign","fromCharCode","endChar","count","digits","charCodeAt","returnValue","parseCustom","oldTokenize","escapePointerToken","toString","pathToPointer","map","join","unescapePointerToken","pointerToPath","split","getLineAndColumn","lines","pastInput","Math","max","previous","upcomingInput","rest","next","min","getPositionContext","past","upcoming","Array","getReason","firstCharacter","charAt","toUpperCase","getLocationOnV8","exec","index","checkUnexpectedEndOnV8","getLocationOnSpiderMonkey","getOffset","improveNativeError","parseNative","parse","isSafari","navigator","userAgent","vendor","oldNode","process","version","startsWith","needsCustomParser","getReviver","getErrorTexts","Object","defineProperty"],"mappings":"CAAC,SAAUA,OAAQC,gBACVC,UAAY,iBAAmBC,SAAW,YAAcF,QAAQC,gBACh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G,QAAUL,MAAMK,QACtB,GAAIL,MAAMM,QAAS,CACjBJ,MAAMI,QAAUN,MAAMM,QACtBJ,MAAMf,SAAW,CACfC,MAAO,CACLC,OAAAA,OACAC,KAAAA,KACAC,OAAAA,SAIN,OAAOW,MAGT,SAASsF,YAAatI,MAAOS,SAC3B,IACE,OAAOkC,KAAK4F,MAAMvI,MAAOS,SACzB,MAAOuC,OACP,MAAMqF,mBAAmBrI,MAAOgD,QAMpC,MAAMwF,gBAAkBC,YAAc,aAAe,SAASvJ,KAAKuJ,UAAUC,YAAc,iBAAiBxJ,KAAKuJ,UAAUE,QAC3H,MAAMC,eAAiBC,UAAY,aAAeA,QAAQC,QAAQC,WAAW,OAE7E,SAASC,kBAAmB/I,SAC1B,OAAOA,QAAQI,gBAAkBJ,QAAQK,sBACzCL,QAAQM,0BAA4BN,QAAQO,2BAA6B,OACzEP,QAAQG,OAAS,SAAWH,QAAQG,OAAS,SAAWoI,UAAYI,QAGtE,SAASK,WAAYhJ,SACnB,UAAWA,UAAY,WAAY,CACjC,OAAOA,aACF,GAAIA,QAAS,CAClB,OAAOA,QAAQQ,SAInB,SAAS8H,MAAOvI,MAAOC,SACrBA,UAAYA,QAAU,IACtB,OAAO+I,kBAAkB/I,SACrBkG,YAAYnG,MAAOC,SACnBqI,YAAYtI,MAAOiJ,WAAWhJ,UAGlC9B,QAAQoK,MAAQA,MAChBpK,QAAQuC,SAAWA,SACnBvC,QAAQoI,cAAgBA,cACxBpI,QAAQwI,cAAgBA,cAExBxI,QAAQmK,YAAcA,YACtBnK,QAAQgI,YAAcA,YACtBhI,QAAQ+K,cAAgBnG,SAExBoG,OAAOC,eAAejL,QAAS,aAAc,CAAEyD,MAAO","file":"jsonlint.js","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define('jsonlint', ['exports'], factory) :\n (global = global || self, factory(global.jsonlint = {}))\n}(this, function (exports) { 'use strict'\n\n// Modified from https://github.com/rlidwka/jju/blob/master/lib/unicode.js\n\n// This is autogenerated with esprima tools, see:\n// https://github.com/ariya/esprima/blob/master/esprima.js\n\nconst Uni = { // eslint-disable-line no-unused-vars\n isWhiteSpace: function isWhiteSpace (x) {\n // section 7.2, table 2\n return x === '\\u0020' ||\n x === '\\u00A0' ||\n x === '\\uFEFF' || // <-- this is not a Unicode WS, only a JS one\n (x >= '\\u0009' && x <= '\\u000D') || // 9 A B C D\n\n // + whitespace characters from unicode, category Zs\n x === '\\u1680' ||\n (x >= '\\u2000' && x <= '\\u200A') || // 0 1 2 3 4 5 6 7 8 9 A\n x === '\\u2028' ||\n x === '\\u2029' ||\n x === '\\u202F' ||\n x === '\\u205F' ||\n x === '\\u3000'\n },\n isWhiteSpaceJSON: function isWhiteSpaceJSON (x) {\n return x === '\\u0020' ||\n x === '\\u0009' ||\n x === '\\u000A' ||\n x === '\\u000D'\n },\n isLineTerminator: function isLineTerminator (x) {\n // ok, here is the part when JSON is wrong\n // section 7.3, table 3\n return x === '\\u000A' ||\n x === '\\u000D' ||\n x === '\\u2028' ||\n x === '\\u2029'\n },\n isLineTerminatorJSON: function isLineTerminatorJSON (x) {\n return x === '\\u000A' ||\n x === '\\u000D'\n },\n isIdentifierStart: function isIdentifierStart (x) {\n return x === '$' ||\n x === '_' ||\n (x >= 'A' && x <= 'Z') ||\n (x >= 'a' && x <= 'z') ||\n (x >= '\\u0080' && Uni.NonAsciiIdentifierStart.test(x))\n },\n isIdentifierPart: function isIdentifierPart (x) {\n return x === '$' ||\n x === '_' ||\n (x >= 'A' && x <= 'Z') ||\n (x >= 'a' && x <= 'z') ||\n (x >= '0' && x <= '9') || // <-- addition to Start\n (x >= '\\u0080' && Uni.NonAsciiIdentifierPart.test(x))\n },\n // ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierStart:\n NonAsciiIdentifierStart: /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/,\n // ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierPart:\n /* eslint-disable-next-line no-misleading-character-class */\n NonAsciiIdentifierPart: /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0\\u08A2-\\u08AC\\u08E4-\\u08FE\\u0900-\\u0963\\u0966-\\u096F\\u0971-\\u0977\\u0979-\\u097F\\u0981-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5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\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1D00-\\u1DE6\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA697\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A\\uAA7B\\uAA80-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE26\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/\n}\n\n/* globals Uni, getTexts */\n\n// Modified from https://github.com/rlidwka/jju/blob/master/lib/parse.js\n\nfunction isHexDigit (x) {\n return (x >= '0' && x <= '9') ||\n (x >= 'A' && x <= 'F') ||\n (x >= 'a' && x <= 'f')\n}\n\nfunction isOctDigit (x) {\n return x >= '0' && x <= '7'\n}\n\nfunction isDecDigit (x) {\n return x >= '0' && x <= '9'\n}\n\nconst unescapeMap = {\n '\\'': '\\'',\n '\"': '\"',\n '\\\\': '\\\\',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t',\n v: '\\v',\n '/': '/'\n}\n\nfunction parseInternal (input, options) {\n if (typeof input !== 'string' || !(input instanceof String)) {\n input = String(input)\n }\n\n const json5 = options.mode === 'json5'\n const ignoreComments = options.ignoreComments || options.mode === 'cjson' || json5\n const ignoreTrailingCommas = options.ignoreTrailingCommas || json5\n const allowSingleQuotedStrings = options.allowSingleQuotedStrings || json5\n const allowDuplicateObjectKeys = options.allowDuplicateObjectKeys\n const reviver = options.reviver\n const tokenize = options.tokenize\n const rawTokens = options.rawTokens\n const tokenLocations = options.tokenLocations\n const tokenPaths = options.tokenPaths\n\n const isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON\n const isWhiteSpace = json5 ? Uni.isWhiteSpace : Uni.isWhiteSpaceJSON\n\n const inputLength = input.length\n let lineNumber = 0\n let lineStart = 0\n let position = 0\n\n const tokens = []\n let startToken\n let endToken\n let tokenPath\n\n if (tokenize) {\n let tokenOffset = null\n let tokenLine\n let tokenColumn\n startToken = function () {\n if (tokenOffset !== null) throw Error('internal error, token overlap')\n tokenLine = lineNumber + 1\n tokenColumn = position - lineStart + 1\n tokenOffset = position\n }\n endToken = function (type, value) {\n if (tokenOffset !== position) {\n const token = { type }\n if (rawTokens) {\n token.raw = input.substr(tokenOffset, position - tokenOffset)\n }\n if (value !== undefined) {\n token.value = value\n }\n if (tokenLocations) {\n token.location = {\n start: {\n column: tokenColumn,\n line: tokenLine,\n offset: tokenOffset\n }\n }\n }\n if (tokenPaths) {\n token.path = tokenPath.slice()\n }\n tokens.push(token)\n }\n tokenOffset = null\n return value\n }\n tokenPaths && (tokenPath = [])\n }\n\n function generateMessage () {\n let message\n if (position < inputLength) {\n const token = JSON.stringify(input[position])\n message = 'Unexpected token ' + token\n } else {\n message = 'Unexpected end of input'\n }\n return message\n }\n\n function createError (message) {\n const column = position - lineStart + 1\n ++lineNumber\n const texts = getTexts(message, input, position, lineNumber, column)\n const error = SyntaxError(texts.message)\n error.reason = message\n error.excerpt = texts.excerpt\n error.pointer = texts.pointer\n error.location = {\n start: {\n column,\n line: lineNumber,\n offset: position\n }\n }\n return error\n }\n\n function fail (message) {\n if (!message) {\n message = generateMessage()\n }\n const error = createError(message)\n throw error\n }\n\n function newLine (char) {\n // account for <cr><lf>\n if (char === '\\r' && input[position] === '\\n') {\n ++position\n }\n lineStart = position\n ++lineNumber\n }\n\n function parseGeneric () {\n if (position < inputLength) {\n startToken && startToken()\n const char = input[position++]\n if (char === '\"' || (char === '\\'' && allowSingleQuotedStrings)) {\n const string = parseString(char)\n endToken && endToken('literal', string)\n return string\n } else if (char === '{') {\n endToken && endToken('symbol', '{')\n return parseObject()\n } else if (char === '[') {\n endToken && endToken('symbol', '[')\n return parseArray()\n } else if (char === '-' || char === '.' || isDecDigit(char) ||\n (json5 && (char === '+' || char === 'I' || char === 'N'))) {\n const number = parseNumber()\n endToken && endToken('literal', number)\n return number\n } else if (char === 'n') {\n parseKeyword('null')\n endToken && endToken('literal', null)\n return null\n } else if (char === 't') {\n parseKeyword('true')\n endToken && endToken('literal', true)\n return true\n } else if (char === 'f') {\n parseKeyword('false')\n endToken && endToken('literal', false)\n return false\n } else {\n --position\n endToken && endToken()\n return undefined\n }\n }\n }\n\n function parseKey () {\n let result\n if (position < inputLength) {\n startToken && startToken()\n const char = input[position++]\n if (char === '\"' || (char === '\\'' && allowSingleQuotedStrings)) {\n const string = parseString(char)\n endToken && endToken('literal', string)\n return string\n } else if (char === '{') {\n endToken && endToken('symbol', '{')\n return parseObject()\n } else if (char === '[') {\n endToken && endToken('symbol', '[')\n return parseArray()\n } else if (char === '.' || isDecDigit(char)) {\n const number = parseNumber(true)\n endToken && endToken('literal', number)\n return number\n } else if ((json5 && Uni.isIdentifierStart(char)) ||\n (char === '\\\\' && input[position] === 'u')) {\n const rollback = position - 1\n result = parseIdentifier()\n if (result === undefined) {\n position = rollback\n endToken && endToken()\n return undefined\n } else {\n endToken && endToken('literal', result)\n return result\n }\n } else {\n --position\n endToken && endToken()\n return undefined\n }\n }\n }\n\n function skipWhiteSpace () {\n let insideWhiteSpace\n function startWhiteSpace () {\n if (!insideWhiteSpace) {\n insideWhiteSpace = true\n --position\n startToken()\n ++position\n }\n }\n function endWhiteSpace () {\n if (insideWhiteSpace) {\n insideWhiteSpace = false\n endToken('whitespace')\n }\n }\n while (position < inputLength) {\n const char = input[position++]\n if (isLineTerminator(char)) {\n startToken && startWhiteSpace()\n newLine(char)\n } else if (isWhiteSpace(char)) {\n startToken && startWhiteSpace()\n } else if (char === '/' && ignoreComments &&\n (input[position] === '/' || input[position] === '*')) {\n if (startToken) {\n --position\n endWhiteSpace()\n startToken()\n ++position\n }\n skipComment(input[position++] === '*')\n endToken && endToken('comment')\n } else {\n --position\n break\n }\n }\n endToken && endWhiteSpace()\n }\n\n function skipComment (multiLine) {\n while (position < inputLength) {\n const char = input[position++]\n if (isLineTerminator(char)) {\n if (!multiLine) {\n // let parent function deal with newline\n --position\n return\n }\n newLine(char)\n } else if (char === '*' && multiLine) {\n if (input[position] === '/') {\n ++position\n return\n }\n } else {\n // nothing\n }\n }\n if (multiLine) {\n fail('Unclosed multiline comment')\n }\n }\n\n function parseKeyword (keyword) {\n // keyword[0] is not checked because it was checked earlier\n const startPosition = position\n for (let i = 1, keywordLength = keyword.length; i < keywordLength; ++i) {\n if (position >= inputLength || keyword[i] !== input[position]) {\n position = startPosition - 1\n fail()\n }\n ++position\n }\n }\n\n function parseObject () {\n const result = {}\n const emptyObject = {}\n let isNotEmpty = false\n\n while (position < inputLength) {\n skipWhiteSpace()\n const key = parseKey()\n if (allowDuplicateObjectKeys === false && result[key]) {\n fail('Duplicate key: \"' + key + '\"')\n }\n skipWhiteSpace()\n startToken && startToken()\n let char = input[position++]\n endToken && endToken('symbol', char)\n if (char === '}' && key === undefined) {\n if (!ignoreTrailingCommas && isNotEmpty) {\n --position\n fail('Trailing comma in object')\n }\n return result\n } else if (char === ':' && key !== undefined) {\n skipWhiteSpace()\n tokenPath && tokenPath.push(key)\n let value = parseGeneric()\n tokenPath && tokenPath.pop()\n\n if (value === undefined) fail('No value found for key \"' + key + '\"')\n if (typeof key !== 'string') {\n if (!json5 || typeof key !== 'number') {\n fail('Wrong key type: \"' + key + '\"')\n }\n }\n\n if (key in emptyObject || emptyObject[key] != null) {\n // silently ignore it\n } else {\n if (reviver) {\n value = reviver(key, value)\n }\n if (value !== undefined) {\n isNotEmpty = true\n result[key] = value\n }\n }\n\n skipWhiteSpace()\n startToken && startToken()\n char = input[position++]\n endToken && endToken('symbol', char)\n if (char === ',') {\n continue\n } else if (char === '}') {\n return result\n } else {\n fail()\n }\n } else {\n --position\n fail()\n }\n }\n\n fail()\n }\n\n function parseArray () {\n const result = []\n while (position < inputLength) {\n skipWhiteSpace()\n tokenPath && tokenPath.push(result.length)\n let item = parseGeneric()\n tokenPath && tokenPath.pop()\n skipWhiteSpace()\n startToken && startToken()\n const char = input[position++]\n endToken && endToken('symbol', char)\n if (item !== undefined) {\n if (reviver) {\n item = reviver(String(result.length), item)\n }\n if (item === undefined) {\n ++result.length\n item = true // hack for check below, not included into result\n } else {\n result.push(item)\n }\n }\n\n if (char === ',') {\n if (item === undefined) {\n fail('Elisions are not supported')\n }\n } else if (char === ']') {\n if (!ignoreTrailingCommas && item === undefined && result.length) {\n --position\n fail('Trailing comma in array')\n }\n return result\n } else {\n --position\n fail()\n }\n }\n }\n\n function parseNumber () {\n // rewind because we don't know first char\n --position\n\n let start = position\n let char = input[position++]\n const toNumber = function (isOctal) {\n const string = input.substr(start, position - start)\n let result\n\n if (isOctal) {\n result = parseInt(string.replace(/^0o?/, ''), 8)\n } else {\n result = Number(string)\n }\n\n if (Number.isNaN(result)) {\n --position\n fail('Bad numeric literal - \"' + input.substr(start, position - start + 1) + '\"')\n } else if (!json5 && !string.match(/^-?(0|[1-9][0-9]*)(\\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) {\n // additional restrictions imposed by json\n --position\n fail('Non-json numeric literal - \"' + input.substr(start, position - start + 1) + '\"')\n } else {\n return result\n }\n }\n\n // ex: -5982475.249875e+29384\n // ^ skipping this\n if (char === '-' || (char === '+' && json5)) {\n char = input[position++]\n }\n\n if (char === 'N' && json5) {\n parseKeyword('NaN')\n return NaN\n }\n\n if (char === 'I' && json5) {\n parseKeyword('Infinity')\n // returning +inf or -inf\n return toNumber()\n }\n\n if (char >= '1' && char <= '9') {\n // ex: -5982475.249875e+29384\n // ^^^ skipping these\n while (position < inputLength && isDecDigit(input[position])) {\n ++position\n }\n char = input[position++]\n }\n\n // special case for leading zero: 0.123456\n if (char === '0') {\n char = input[position++]\n\n // new syntax, \"0o777\" old syntax, \"0777\"\n const isOctal = char === 'o' || char === 'O' || isOctDigit(char)\n const isHex = char === 'x' || char === 'X'\n\n if (json5 && (isOctal || isHex)) {\n while (position < inputLength &&\n (isHex ? isHexDigit : isOctDigit)(input[position])) {\n ++position\n }\n\n let sign = 1\n if (input[start] === '-') {\n sign = -1\n ++start\n } else if (input[start] === '+') {\n ++start\n }\n\n return sign * toNumber(isOctal)\n }\n }\n\n if (char === '.') {\n // ex: -5982475.249875e+29384\n // ^^^ skipping these\n while (position < inputLength && isDecDigit(input[position])) {\n ++position\n }\n char = input[position++]\n }\n\n if (char === 'e' || char === 'E') {\n char = input[position++]\n if (char === '-' || char === '+') {\n ++position\n }\n // ex: -5982475.249875e+29384\n // ^^^ skipping these\n while (position < inputLength && isDecDigit(input[position])) {\n ++position\n }\n char = input[position++]\n }\n\n // we have char in the buffer, so count for it\n --position\n return toNumber()\n }\n\n function parseIdentifier () {\n // rewind because we don't know first char\n --position\n\n let result = ''\n while (position < inputLength) {\n let char = input[position++]\n if (char === '\\\\' &&\n input[position] === 'u' &&\n isHexDigit(input[position + 1]) &&\n isHexDigit(input[position + 2]) &&\n isHexDigit(input[position + 3]) &&\n isHexDigit(input[position + 4])) {\n // UnicodeEscapeSequence\n char = String.fromCharCode(parseInt(input.substr(position + 1, 4), 16))\n position += 5\n }\n\n if (result.length) {\n // identifier started\n if (Uni.isIdentifierPart(char)) {\n result += char\n } else {\n --position\n return result\n }\n } else {\n if (Uni.isIdentifierStart(char)) {\n result += char\n } else {\n return undefined\n }\n }\n }\n\n fail()\n }\n\n function parseString (endChar) {\n // 7.8.4 of ES262 spec\n let result = ''\n while (position < inputLength) {\n let char = input[position++]\n if (char === endChar) {\n return result\n } else if (char === '\\\\') {\n if (position >= inputLength) {\n fail()\n }\n char = input[position++]\n if (unescapeMap[char] && (json5 || (char !== 'v' && (char !== \"'\" || allowSingleQuotedStrings)))) {\n result += unescapeMap[char]\n } else if (json5 && isLineTerminator(char)) {\n // line continuation\n newLine(char)\n } else if (char === 'u' || (char === 'x' && json5)) {\n // unicode/character escape sequence\n const count = char === 'u' ? 4 : 2\n // validation for \\uXXXX\n for (let i = 0; i < count; ++i) {\n if (position >= inputLength) {\n fail()\n }\n if (!isHexDigit(input[position])) {\n fail('Bad escape sequence')\n }\n position++\n }\n result += String.fromCharCode(parseInt(input.substr(position - count, count), 16))\n } else if (json5 && isOctDigit(char)) {\n let digits\n if (char < '4' && isOctDigit(input[position]) && isOctDigit(input[position + 1])) {\n // three-digit octal\n digits = 3\n } else if (isOctDigit(input[position])) {\n // two-digit octal\n digits = 2\n } else {\n digits = 1\n }\n position += digits - 1\n result += String.fromCharCode(parseInt(input.substr(position - digits, digits), 8))\n } else if (json5) {\n // \\X -> x\n result += char\n } else {\n --position\n fail()\n }\n } else if (isLineTerminator(char)) {\n fail()\n } else {\n if (!json5 && char.charCodeAt(0) < 32) {\n --position\n fail('Unexpected control character')\n }\n // SourceCharacter but not one of \" or \\ or LineTerminator\n result += char\n }\n }\n\n fail()\n }\n\n skipWhiteSpace()\n let returnValue = parseGeneric()\n if (returnValue !== undefined || position < inputLength) {\n skipWhiteSpace()\n if (position >= inputLength) {\n if (reviver) {\n returnValue = reviver('', returnValue)\n }\n return tokenize ? tokens : returnValue\n } else {\n fail()\n }\n } else {\n if (position) {\n fail('No data, only a whitespace')\n } else {\n fail('No data, empty input')\n }\n }\n}\n\nfunction parseCustom (input, options) { // eslint-disable-line no-unused-vars\n if (typeof options === 'function') {\n options = {\n reviver: options\n }\n } else if (!options) {\n options = {}\n }\n return parseInternal(input, options)\n}\n\nfunction tokenize (input, options) { // eslint-disable-line no-unused-vars\n if (!options) {\n options = {}\n }\n // As long as this is the single modification, this is easier than cloning.\n // (Once Node.js 6 is dropped, this can be replaced by object destructuring.)\n const oldTokenize = options.tokenize\n options.tokenize = true\n const tokens = parseInternal(input, options)\n options.tokenize = oldTokenize\n return tokens\n}\n\nfunction escapePointerToken (token) {\n return token\n .toString()\n .replace(/~/g, '~0')\n .replace(/\\//g, '~1')\n}\n\nfunction pathToPointer (tokens) { // eslint-disable-line no-unused-vars\n if (tokens.length === 0) {\n return ''\n }\n return '/' + tokens\n .map(escapePointerToken)\n .join('/')\n}\n\nfunction unescapePointerToken (token) {\n return token\n .replace(/~1/g, '/')\n .replace(/~0/g, '~')\n}\n\nfunction pointerToPath (pointer) { // eslint-disable-line no-unused-vars\n if (pointer === '') {\n return []\n }\n if (pointer[0] !== '/') {\n throw new Error('Missing initial \"/\" in the reference')\n }\n return pointer\n .substr(1)\n .split('/')\n .map(unescapePointerToken)\n}\n\nfunction getLineAndColumn (input, offset) {\n const lines = input\n .substr(0, offset)\n .split(/\\r?\\n/)\n const line = lines.length\n const column = lines[line - 1].length + 1\n return {\n line,\n column\n }\n}\n\nfunction pastInput (input, offset) {\n const start = Math.max(0, offset - 20)\n const previous = input.substr(start, offset - start)\n return (offset > 20 ? '...' : '') + previous.replace(/\\r?\\n/g, '')\n}\n\nfunction upcomingInput (input, offset) {\n let start = Math.max(0, offset - 20)\n start += offset - start\n const rest = input.length - start\n const next = input.substr(start, Math.min(20, rest))\n return next.replace(/\\r?\\n/g, '') + (rest > 20 ? '...' : '')\n}\n\nfunction getPositionContext (input, offset) {\n const past = pastInput(input, offset)\n const upcoming = upcomingInput(input, offset)\n const pointer = new Array(past.length + 1).join('-') + '^'\n return {\n excerpt: past + upcoming,\n pointer\n }\n}\n\nfunction getReason (error) {\n let message = error.message\n .replace('JSON.parse: ', '') // SpiderMonkey\n .replace('JSON Parse error: ', '') // SquirrelFish\n const firstCharacter = message.charAt(0)\n if (firstCharacter >= 'a') {\n message = firstCharacter.toUpperCase() + message.substr(1)\n }\n return message\n}\n\nfunction getLocationOnV8 (input, reason) {\n const match = / in JSON at position (\\d+)$/.exec(reason)\n if (match) {\n const offset = +match[1]\n const location = getLineAndColumn(input, offset)\n return {\n offset,\n line: location.line,\n column: location.column,\n reason: reason.substr(0, match.index)\n }\n }\n}\n\nfunction checkUnexpectedEndOnV8 (input, reason) {\n const match = / end of JSON input$/.exec(reason)\n if (match) {\n const offset = input.length\n const location = getLineAndColumn(input, offset)\n return {\n offset,\n line: location.line,\n column: location.column,\n reason: reason.substr(0, match.index + 4)\n }\n }\n}\n\nfunction getLocationOnSpiderMonkey (input, reason) {\n const match = / at line (\\d+) column (\\d+) of the JSON data$/.exec(reason)\n if (match) {\n const line = +match[1]\n const column = +match[2]\n const offset = getOffset(input, line, column) // eslint-disable-line no-undef\n return {\n offset,\n line,\n column,\n reason: reason.substr(0, match.index)\n }\n }\n}\n\nfunction getTexts (reason, input, offset, line, column) {\n const position = getPositionContext(input, offset)\n const excerpt = position.excerpt\n let message, pointer\n if (typeof line === 'number') {\n pointer = position.pointer\n message = 'Parse error on line ' + line + ', column ' +\n column + ':\\n' + excerpt + '\\n' + pointer + '\\n' + reason\n } else {\n message = 'Parse error in JSON input:\\n' + excerpt + '\\n' + reason\n }\n return {\n message,\n excerpt,\n pointer\n }\n}\n\nfunction improveNativeError (input, error) {\n let reason = getReason(error)\n const location = getLocationOnV8(input, reason) ||\n checkUnexpectedEndOnV8(input, reason) ||\n getLocationOnSpiderMonkey(input, reason)\n let offset, line, column\n if (location) {\n offset = location.offset\n line = location.line\n column = location.column\n reason = location.reason\n } else {\n offset = 0\n }\n error.reason = reason\n const texts = getTexts(reason, input, offset, line, column)\n error.message = texts.message\n error.excerpt = texts.excerpt\n if (texts.pointer) {\n error.pointer = texts.pointer\n error.location = {\n start: {\n column,\n line,\n offset\n }\n }\n }\n return error\n}\n\nfunction parseNative (input, reviver) { // eslint-disable-line no-unused-vars\n try {\n return JSON.parse(input, reviver)\n } catch (error) {\n throw improveNativeError(input, error)\n }\n}\n\n/* globals navigator, process, parseCustom, parseNative */\n\nconst isSafari = typeof navigator !== 'undefined' && /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor)\nconst oldNode = typeof process !== 'undefined' && process.version.startsWith('v4.')\n\nfunction needsCustomParser (options) {\n return options.ignoreComments || options.ignoreTrailingCommas ||\n options.allowSingleQuotedStrings || options.allowDuplicateObjectKeys === false ||\n options.mode === 'cjson' || options.mode === 'json5' || isSafari || oldNode\n}\n\nfunction getReviver (options) {\n if (typeof options === 'function') {\n return options\n } else if (options) {\n return options.reviver\n }\n}\n\nfunction parse (input, options) { // eslint-disable-line no-unused-vars\n options || (options = {})\n return needsCustomParser(options)\n ? parseCustom(input, options)\n : parseNative(input, getReviver(options))\n}\n\n exports.parse = parse\n exports.tokenize = tokenize\n exports.pathToPointer = pathToPointer\n exports.pointerToPath = pointerToPath\n\n exports.parseNative = parseNative\n exports.parseCustom = parseCustom\n exports.getErrorTexts = getTexts\n\n Object.defineProperty(exports, '__esModule', { value: true })\n}));\n"]}
|
|
1
|
+
{"version":3,"sources":["lib/jsonlint.js"],"names":["global","factory","exports","module","define","amd","self","jsonlint","this","Uni","isWhiteSpace","x","isWhiteSpaceJSON","isLineTerminator","isLineTerminatorJSON","isIdentifierStart","NonAsciiIdentifierStart","test","isIdentifierPart","NonAsciiIdentifierPart","isHexDigit","isOctDigit","isDecDigit","unescapeMap","b","f","n","r","t","v","parseInternal","input","options","String","json5","mode","ignoreComments","ignoreTrailingCommas","allowSingleQuotedStrings","allowDuplicateObjectKeys","reviver","tokenize","rawTokens","tokenLocations","tokenPaths","inputLength","length","lineNumber","lineStart","position","tokens","startToken","endToken","tokenPath","tokenOffset","tokenLine","tokenColumn","Error","type","value","token","raw","substr","undefined","location","start","column","line","offset","path","slice","push","generateMessage","message","JSON","stringify","createError","texts","getTexts","error","SyntaxError","reason","excerpt","pointer","fail","newLine","char","parseGeneric","string","parseString","parseObject","parseArray","number","parseNumber","parseKeyword","parseKey","result","rollback","parseIdentifier","skipWhiteSpace","insideWhiteSpace","startWhiteSpace","endWhiteSpace","skipComment","multiLine","keyword","startPosition","i","keywordLength","emptyObject","isNotEmpty","key","pop","item","toNumber","isOctal","parseInt","replace","Number","isNaN","match","NaN","isHex","sign","fromCharCode","endChar","count","digits","charCodeAt","returnValue","parseCustom","oldTokenize","escapePointerToken","toString","pathToPointer","map","join","unescapePointerToken","pointerToPath","split","getLineAndColumn","lines","getOffset","breaks","exec","index","pastInput","Math","max","previous","upcomingInput","rest","next","min","getPositionContext","past","upcoming","Array","getReason","firstCharacter","charAt","toUpperCase","getLocationOnV8","checkUnexpectedEndOnV8","getLocationOnSpiderMonkey","improveNativeError","parseNative","parse","isSafari","navigator","userAgent","vendor","oldNode","process","version","startsWith","needs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I,cAAgBA,cACxBpI,QAAQwI,cAAgBA,cAExBxI,QAAQoK,YAAcA,YACtBpK,QAAQgI,YAAcA,YACtBhI,QAAQgL,cAAgBpG,SAExBqG,OAAOC,eAAelL,QAAS,aAAc,CAAEyD,MAAO","file":"jsonlint.js","sourcesContent":["(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define('jsonlint', ['exports'], factory) :\n (global = global || self, factory(global.jsonlint = {}))\n}(this, function (exports) { 'use strict'\n\n// Modified from https://github.com/rlidwka/jju/blob/master/lib/unicode.js\n\n// This is autogenerated with esprima tools, see:\n// https://github.com/ariya/esprima/blob/master/esprima.js\n\nconst Uni = { // eslint-disable-line no-unused-vars\n isWhiteSpace: function isWhiteSpace (x) {\n // section 7.2, table 2\n return x === '\\u0020' ||\n x === '\\u00A0' ||\n x === '\\uFEFF' || // <-- this is not a Unicode WS, only a JS one\n (x >= '\\u0009' && x <= '\\u000D') || // 9 A B C D\n\n // + whitespace characters from unicode, category Zs\n x === '\\u1680' ||\n (x >= '\\u2000' && x <= '\\u200A') || // 0 1 2 3 4 5 6 7 8 9 A\n x === '\\u2028' ||\n x === '\\u2029' ||\n x === '\\u202F' ||\n x === '\\u205F' ||\n x === '\\u3000'\n },\n isWhiteSpaceJSON: function isWhiteSpaceJSON (x) {\n return x === '\\u0020' ||\n x === '\\u0009' ||\n x === '\\u000A' ||\n x === '\\u000D'\n },\n isLineTerminator: function isLineTerminator (x) {\n // ok, here is the part when JSON is wrong\n // section 7.3, table 3\n return x === '\\u000A' ||\n x === '\\u000D' ||\n x === '\\u2028' ||\n x === '\\u2029'\n },\n isLineTerminatorJSON: function isLineTerminatorJSON (x) {\n return x === '\\u000A' ||\n x === '\\u000D'\n },\n isIdentifierStart: function isIdentifierStart (x) {\n return x === '$' ||\n x === '_' ||\n (x >= 'A' && x <= 'Z') ||\n (x >= 'a' && x <= 'z') ||\n (x >= '\\u0080' && Uni.NonAsciiIdentifierStart.test(x))\n },\n isIdentifierPart: function isIdentifierPart (x) {\n return x === '$' ||\n x === '_' ||\n (x >= 'A' && x <= 'Z') ||\n (x >= 'a' && x <= 'z') ||\n (x >= '0' && x <= '9') || // <-- addition to Start\n (x >= '\\u0080' && Uni.NonAsciiIdentifierPart.test(x))\n },\n // ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierStart:\n NonAsciiIdentifierStart: /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB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u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/,\n // ECMAScript 5.1/Unicode v6.3.0 NonAsciiIdentifierPart:\n /* eslint-disable-next-line no-misleading-character-class */\n NonAsciiIdentifierPart: /[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0\\u08A2-\\u08AC\\u08E4-\\u08FE\\u0900-\\u0963\\u0966-\\u096F\\u0971-\\u0977\\u0979-\\u097F\\u0981-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B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u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1D00-\\u1DE6\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA697\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A\\uAA7B\\uAA80-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE26\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/\n}\n\n/* globals Uni, getTexts */\n\n// Modified from https://github.com/rlidwka/jju/blob/master/lib/parse.js\n\nfunction isHexDigit (x) {\n return (x >= '0' && x <= '9') ||\n (x >= 'A' && x <= 'F') ||\n (x >= 'a' && x <= 'f')\n}\n\nfunction isOctDigit (x) {\n return x >= '0' && x <= '7'\n}\n\nfunction isDecDigit (x) {\n return x >= '0' && x <= '9'\n}\n\nconst unescapeMap = {\n '\\'': '\\'',\n '\"': '\"',\n '\\\\': '\\\\',\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t',\n v: '\\v',\n '/': '/'\n}\n\nfunction parseInternal (input, options) {\n if (typeof input !== 'string' || !(input instanceof String)) {\n input = String(input)\n }\n\n const json5 = options.mode === 'json5'\n const ignoreComments = options.ignoreComments || options.mode === 'cjson' || json5\n const ignoreTrailingCommas = options.ignoreTrailingCommas || json5\n const allowSingleQuotedStrings = options.allowSingleQuotedStrings || json5\n const allowDuplicateObjectKeys = options.allowDuplicateObjectKeys\n const reviver = options.reviver\n const tokenize = options.tokenize\n const rawTokens = options.rawTokens\n const tokenLocations = options.tokenLocations\n const tokenPaths = options.tokenPaths\n\n const isLineTerminator = json5 ? Uni.isLineTerminator : Uni.isLineTerminatorJSON\n const isWhiteSpace = json5 ? Uni.isWhiteSpace : Uni.isWhiteSpaceJSON\n\n const inputLength = input.length\n let lineNumber = 0\n let lineStart = 0\n let position = 0\n\n const tokens = []\n let startToken\n let endToken\n let tokenPath\n\n if (tokenize) {\n let tokenOffset = null\n let tokenLine\n let tokenColumn\n startToken = function () {\n if (tokenOffset !== null) throw Error('internal error, token overlap')\n tokenLine = lineNumber + 1\n tokenColumn = position - lineStart + 1\n tokenOffset = position\n }\n endToken = function (type, value) {\n if (tokenOffset !== position) {\n const token = { type }\n if (rawTokens) {\n token.raw = input.substr(tokenOffset, position - tokenOffset)\n }\n if (value !== undefined) {\n token.value = value\n }\n if (tokenLocations) {\n token.location = {\n start: {\n column: tokenColumn,\n line: tokenLine,\n offset: tokenOffset\n }\n }\n }\n if (tokenPaths) {\n token.path = tokenPath.slice()\n }\n tokens.push(token)\n }\n tokenOffset = null\n return value\n }\n tokenPaths && (tokenPath = [])\n }\n\n function generateMessage () {\n let message\n if (position < inputLength) {\n const token = JSON.stringify(input[position])\n message = 'Unexpected token ' + token\n } else {\n message = 'Unexpected end of input'\n }\n return message\n }\n\n function createError (message) {\n const column = position - lineStart + 1\n ++lineNumber\n const texts = getTexts(message, input, position, lineNumber, column)\n const error = SyntaxError(texts.message)\n error.reason = message\n error.excerpt = texts.excerpt\n error.pointer = texts.pointer\n error.location = {\n start: {\n column,\n line: lineNumber,\n offset: position\n }\n }\n return error\n }\n\n function fail (message) {\n if (!message) {\n message = generateMessage()\n }\n const error = createError(message)\n throw error\n }\n\n function newLine (char) {\n // account for <cr><lf>\n if (char === '\\r' && input[position] === '\\n') {\n ++position\n }\n lineStart = position\n ++lineNumber\n }\n\n function parseGeneric () {\n if (position < inputLength) {\n startToken && startToken()\n const char = input[position++]\n if (char === '\"' || (char === '\\'' && allowSingleQuotedStrings)) {\n const string = parseString(char)\n endToken && endToken('literal', string)\n return string\n } else if (char === '{') {\n endToken && endToken('symbol', '{')\n return parseObject()\n } else if (char === '[') {\n endToken && endToken('symbol', '[')\n return parseArray()\n } else if (char === '-' || char === '.' || isDecDigit(char) ||\n (json5 && (char === '+' || char === 'I' || char === 'N'))) {\n const number = parseNumber()\n endToken && endToken('literal', number)\n return number\n } else if (char === 'n') {\n parseKeyword('null')\n endToken && endToken('literal', null)\n return null\n } else if (char === 't') {\n parseKeyword('true')\n endToken && endToken('literal', true)\n return true\n } else if (char === 'f') {\n parseKeyword('false')\n endToken && endToken('literal', false)\n return false\n } else {\n --position\n endToken && endToken()\n return undefined\n }\n }\n }\n\n function parseKey () {\n let result\n if (position < inputLength) {\n startToken && startToken()\n const char = input[position++]\n if (char === '\"' || (char === '\\'' && allowSingleQuotedStrings)) {\n const string = parseString(char)\n endToken && endToken('literal', string)\n return string\n } else if (char === '{') {\n endToken && endToken('symbol', '{')\n return parseObject()\n } else if (char === '[') {\n endToken && endToken('symbol', '[')\n return parseArray()\n } else if (char === '.' || isDecDigit(char)) {\n const number = parseNumber(true)\n endToken && endToken('literal', number)\n return number\n } else if ((json5 && Uni.isIdentifierStart(char)) ||\n (char === '\\\\' && input[position] === 'u')) {\n const rollback = position - 1\n result = parseIdentifier()\n if (result === undefined) {\n position = rollback\n endToken && endToken()\n return undefined\n } else {\n endToken && endToken('literal', result)\n return result\n }\n } else {\n --position\n endToken && endToken()\n return undefined\n }\n }\n }\n\n function skipWhiteSpace () {\n let insideWhiteSpace\n function startWhiteSpace () {\n if (!insideWhiteSpace) {\n insideWhiteSpace = true\n --position\n startToken()\n ++position\n }\n }\n function endWhiteSpace () {\n if (insideWhiteSpace) {\n insideWhiteSpace = false\n endToken('whitespace')\n }\n }\n while (position < inputLength) {\n const char = input[position++]\n if (isLineTerminator(char)) {\n startToken && startWhiteSpace()\n newLine(char)\n } else if (isWhiteSpace(char)) {\n startToken && startWhiteSpace()\n } else if (char === '/' && ignoreComments &&\n (input[position] === '/' || input[position] === '*')) {\n if (startToken) {\n --position\n endWhiteSpace()\n startToken()\n ++position\n }\n skipComment(input[position++] === '*')\n endToken && endToken('comment')\n } else {\n --position\n break\n }\n }\n endToken && endWhiteSpace()\n }\n\n function skipComment (multiLine) {\n while (position < inputLength) {\n const char = input[position++]\n if (isLineTerminator(char)) {\n if (!multiLine) {\n // let parent function deal with newline\n --position\n return\n }\n newLine(char)\n } else if (char === '*' && multiLine) {\n if (input[position] === '/') {\n ++position\n return\n }\n } else {\n // nothing\n }\n }\n if (multiLine) {\n fail('Unclosed multiline comment')\n }\n }\n\n function parseKeyword (keyword) {\n // keyword[0] is not checked because it was checked earlier\n const startPosition = position\n for (let i = 1, keywordLength = keyword.length; i < keywordLength; ++i) {\n if (position >= inputLength || keyword[i] !== input[position]) {\n position = startPosition - 1\n fail()\n }\n ++position\n }\n }\n\n function parseObject () {\n const result = {}\n const emptyObject = {}\n let isNotEmpty = false\n\n while (position < inputLength) {\n skipWhiteSpace()\n const key = parseKey()\n if (allowDuplicateObjectKeys === false && result[key]) {\n fail('Duplicate key: \"' + key + '\"')\n }\n skipWhiteSpace()\n startToken && startToken()\n let char = input[position++]\n endToken && endToken('symbol', char)\n if (char === '}' && key === undefined) {\n if (!ignoreTrailingCommas && isNotEmpty) {\n --position\n fail('Trailing comma in object')\n }\n return result\n } else if (char === ':' && key !== undefined) {\n skipWhiteSpace()\n tokenPath && tokenPath.push(key)\n let value = parseGeneric()\n tokenPath && tokenPath.pop()\n\n if (value === undefined) fail('No value found for key \"' + key + '\"')\n if (typeof key !== 'string') {\n if (!json5 || typeof key !== 'number') {\n fail('Wrong key type: \"' + key + '\"')\n }\n }\n\n if (key in emptyObject || emptyObject[key] != null) {\n // silently ignore it\n } else {\n if (reviver) {\n value = reviver(key, value)\n }\n if (value !== undefined) {\n isNotEmpty = true\n result[key] = value\n }\n }\n\n skipWhiteSpace()\n startToken && startToken()\n char = input[position++]\n endToken && endToken('symbol', char)\n if (char === ',') {\n continue\n } else if (char === '}') {\n return result\n } else {\n fail()\n }\n } else {\n --position\n fail()\n }\n }\n\n fail()\n }\n\n function parseArray () {\n const result = []\n while (position < inputLength) {\n skipWhiteSpace()\n tokenPath && tokenPath.push(result.length)\n let item = parseGeneric()\n tokenPath && tokenPath.pop()\n skipWhiteSpace()\n startToken && startToken()\n const char = input[position++]\n endToken && endToken('symbol', char)\n if (item !== undefined) {\n if (reviver) {\n item = reviver(String(result.length), item)\n }\n if (item === undefined) {\n ++result.length\n item = true // hack for check below, not included into result\n } else {\n result.push(item)\n }\n }\n\n if (char === ',') {\n if (item === undefined) {\n fail('Elisions are not supported')\n }\n } else if (char === ']') {\n if (!ignoreTrailingCommas && item === undefined && result.length) {\n --position\n fail('Trailing comma in array')\n }\n return result\n } else {\n --position\n fail()\n }\n }\n }\n\n function parseNumber () {\n // rewind because we don't know first char\n --position\n\n let start = position\n let char = input[position++]\n const toNumber = function (isOctal) {\n const string = input.substr(start, position - start)\n let result\n\n if (isOctal) {\n result = parseInt(string.replace(/^0o?/, ''), 8)\n } else {\n result = Number(string)\n }\n\n if (Number.isNaN(result)) {\n --position\n fail('Bad numeric literal - \"' + input.substr(start, position - start + 1) + '\"')\n } else if (!json5 && !string.match(/^-?(0|[1-9][0-9]*)(\\.[0-9]+)?(e[+-]?[0-9]+)?$/i)) {\n // additional restrictions imposed by json\n --position\n fail('Non-json numeric literal - \"' + input.substr(start, position - start + 1) + '\"')\n } else {\n return result\n }\n }\n\n // ex: -5982475.249875e+29384\n // ^ skipping this\n if (char === '-' || (char === '+' && json5)) {\n char = input[position++]\n }\n\n if (char === 'N' && json5) {\n parseKeyword('NaN')\n return NaN\n }\n\n if (char === 'I' && json5) {\n parseKeyword('Infinity')\n // returning +inf or -inf\n return toNumber()\n }\n\n if (char >= '1' && char <= '9') {\n // ex: -5982475.249875e+29384\n // ^^^ skipping these\n while (position < inputLength && isDecDigit(input[position])) {\n ++position\n }\n char = input[position++]\n }\n\n // special case for leading zero: 0.123456\n if (char === '0') {\n char = input[position++]\n\n // new syntax, \"0o777\" old syntax, \"0777\"\n const isOctal = char === 'o' || char === 'O' || isOctDigit(char)\n const isHex = char === 'x' || char === 'X'\n\n if (json5 && (isOctal || isHex)) {\n while (position < inputLength &&\n (isHex ? isHexDigit : isOctDigit)(input[position])) {\n ++position\n }\n\n let sign = 1\n if (input[start] === '-') {\n sign = -1\n ++start\n } else if (input[start] === '+') {\n ++start\n }\n\n return sign * toNumber(isOctal)\n }\n }\n\n if (char === '.') {\n // ex: -5982475.249875e+29384\n // ^^^ skipping these\n while (position < inputLength && isDecDigit(input[position])) {\n ++position\n }\n char = input[position++]\n }\n\n if (char === 'e' || char === 'E') {\n char = input[position++]\n if (char === '-' || char === '+') {\n ++position\n }\n // ex: -5982475.249875e+29384\n // ^^^ skipping these\n while (position < inputLength && isDecDigit(input[position])) {\n ++position\n }\n char = input[position++]\n }\n\n // we have char in the buffer, so count for it\n --position\n return toNumber()\n }\n\n function parseIdentifier () {\n // rewind because we don't know first char\n --position\n\n let result = ''\n while (position < inputLength) {\n let char = input[position++]\n if (char === '\\\\' &&\n input[position] === 'u' &&\n isHexDigit(input[position + 1]) &&\n isHexDigit(input[position + 2]) &&\n isHexDigit(input[position + 3]) &&\n isHexDigit(input[position + 4])) {\n // UnicodeEscapeSequence\n char = String.fromCharCode(parseInt(input.substr(position + 1, 4), 16))\n position += 5\n }\n\n if (result.length) {\n // identifier started\n if (Uni.isIdentifierPart(char)) {\n result += char\n } else {\n --position\n return result\n }\n } else {\n if (Uni.isIdentifierStart(char)) {\n result += char\n } else {\n return undefined\n }\n }\n }\n\n fail()\n }\n\n function parseString (endChar) {\n // 7.8.4 of ES262 spec\n let result = ''\n while (position < inputLength) {\n let char = input[position++]\n if (char === endChar) {\n return result\n } else if (char === '\\\\') {\n if (position >= inputLength) {\n fail()\n }\n char = input[position++]\n if (unescapeMap[char] && (json5 || (char !== 'v' && (char !== \"'\" || allowSingleQuotedStrings)))) {\n result += unescapeMap[char]\n } else if (json5 && isLineTerminator(char)) {\n // line continuation\n newLine(char)\n } else if (char === 'u' || (char === 'x' && json5)) {\n // unicode/character escape sequence\n const count = char === 'u' ? 4 : 2\n // validation for \\uXXXX\n for (let i = 0; i < count; ++i) {\n if (position >= inputLength) {\n fail()\n }\n if (!isHexDigit(input[position])) {\n fail('Bad escape sequence')\n }\n position++\n }\n result += String.fromCharCode(parseInt(input.substr(position - count, count), 16))\n } else if (json5 && isOctDigit(char)) {\n let digits\n if (char < '4' && isOctDigit(input[position]) && isOctDigit(input[position + 1])) {\n // three-digit octal\n digits = 3\n } else if (isOctDigit(input[position])) {\n // two-digit octal\n digits = 2\n } else {\n digits = 1\n }\n position += digits - 1\n result += String.fromCharCode(parseInt(input.substr(position - digits, digits), 8))\n } else if (json5) {\n // \\X -> x\n result += char\n } else {\n --position\n fail()\n }\n } else if (isLineTerminator(char)) {\n fail()\n } else {\n if (!json5 && char.charCodeAt(0) < 32) {\n --position\n fail('Unexpected control character')\n }\n // SourceCharacter but not one of \" or \\ or LineTerminator\n result += char\n }\n }\n\n fail()\n }\n\n skipWhiteSpace()\n let returnValue = parseGeneric()\n if (returnValue !== undefined || position < inputLength) {\n skipWhiteSpace()\n if (position >= inputLength) {\n if (reviver) {\n returnValue = reviver('', returnValue)\n }\n return tokenize ? tokens : returnValue\n } else {\n fail()\n }\n } else {\n if (position) {\n fail('No data, only a whitespace')\n } else {\n fail('No data, empty input')\n }\n }\n}\n\nfunction parseCustom (input, options) { // eslint-disable-line no-unused-vars\n if (typeof options === 'function') {\n options = {\n reviver: options\n }\n } else if (!options) {\n options = {}\n }\n return parseInternal(input, options)\n}\n\nfunction tokenize (input, options) { // eslint-disable-line no-unused-vars\n if (!options) {\n options = {}\n }\n // As long as this is the single modification, this is easier than cloning.\n // (Once Node.js 6 is dropped, this can be replaced by object destructuring.)\n const oldTokenize = options.tokenize\n options.tokenize = true\n const tokens = parseInternal(input, options)\n options.tokenize = oldTokenize\n return tokens\n}\n\nfunction escapePointerToken (token) {\n return token\n .toString()\n .replace(/~/g, '~0')\n .replace(/\\//g, '~1')\n}\n\nfunction pathToPointer (tokens) { // eslint-disable-line no-unused-vars\n if (tokens.length === 0) {\n return ''\n }\n return '/' + tokens\n .map(escapePointerToken)\n .join('/')\n}\n\nfunction unescapePointerToken (token) {\n return token\n .replace(/~1/g, '/')\n .replace(/~0/g, '~')\n}\n\nfunction pointerToPath (pointer) { // eslint-disable-line no-unused-vars\n if (pointer === '') {\n return []\n }\n if (pointer[0] !== '/') {\n throw new Error('Missing initial \"/\" in the reference')\n }\n return pointer\n .substr(1)\n .split('/')\n .map(unescapePointerToken)\n}\n\nfunction getLineAndColumn (input, offset) {\n const lines = input\n .substr(0, offset)\n .split(/\\r?\\n/)\n const line = lines.length\n const column = lines[line - 1].length + 1\n return {\n line,\n column\n }\n}\n\nfunction getOffset (input, line, column) {\n if (line > 1) {\n const breaks = /\\r?\\n/g\n let match\n while (match = breaks.exec(input)) { // eslint-disable-line no-cond-assign\n if (--line === 1) {\n return match.index + column\n }\n }\n }\n return column - 1\n}\n\nfunction pastInput (input, offset) {\n const start = Math.max(0, offset - 20)\n const previous = input.substr(start, offset - start)\n return (offset > 20 ? '...' : '') + previous.replace(/\\r?\\n/g, '')\n}\n\nfunction upcomingInput (input, offset) {\n let start = Math.max(0, offset - 20)\n start += offset - start\n const rest = input.length - start\n const next = input.substr(start, Math.min(20, rest))\n return next.replace(/\\r?\\n/g, '') + (rest > 20 ? '...' : '')\n}\n\nfunction getPositionContext (input, offset) {\n const past = pastInput(input, offset)\n const upcoming = upcomingInput(input, offset)\n const pointer = new Array(past.length + 1).join('-') + '^'\n return {\n excerpt: past + upcoming,\n pointer\n }\n}\n\nfunction getReason (error) {\n let message = error.message\n .replace('JSON.parse: ', '') // SpiderMonkey\n .replace('JSON Parse error: ', '') // SquirrelFish\n const firstCharacter = message.charAt(0)\n if (firstCharacter >= 'a') {\n message = firstCharacter.toUpperCase() + message.substr(1)\n }\n return message\n}\n\nfunction getLocationOnV8 (input, reason) {\n const match = / in JSON at position (\\d+)$/.exec(reason)\n if (match) {\n const offset = +match[1]\n const location = getLineAndColumn(input, offset)\n return {\n offset,\n line: location.line,\n column: location.column,\n reason: reason.substr(0, match.index)\n }\n }\n}\n\nfunction checkUnexpectedEndOnV8 (input, reason) {\n const match = / end of JSON input$/.exec(reason)\n if (match) {\n const offset = input.length\n const location = getLineAndColumn(input, offset)\n return {\n offset,\n line: location.line,\n column: location.column,\n reason: reason.substr(0, match.index + 4)\n }\n }\n}\n\nfunction getLocationOnSpiderMonkey (input, reason) {\n const match = / at line (\\d+) column (\\d+) of the JSON data$/.exec(reason)\n if (match) {\n const line = +match[1]\n const column = +match[2]\n const offset = getOffset(input, line, column) // eslint-disable-line no-undef\n return {\n offset,\n line,\n column,\n reason: reason.substr(0, match.index)\n }\n }\n}\n\nfunction getTexts (reason, input, offset, line, column) {\n const position = getPositionContext(input, offset)\n const excerpt = position.excerpt\n let message, pointer\n if (typeof line === 'number') {\n pointer = position.pointer\n message = 'Parse error on line ' + line + ', column ' +\n column + ':\\n' + excerpt + '\\n' + pointer + '\\n' + reason\n } else {\n message = 'Parse error in JSON input:\\n' + excerpt + '\\n' + reason\n }\n return {\n message,\n excerpt,\n pointer\n }\n}\n\nfunction improveNativeError (input, error) {\n let reason = getReason(error)\n const location = getLocationOnV8(input, reason) ||\n checkUnexpectedEndOnV8(input, reason) ||\n getLocationOnSpiderMonkey(input, reason)\n let offset, line, column\n if (location) {\n offset = location.offset\n line = location.line\n column = location.column\n reason = location.reason\n } else {\n offset = 0\n }\n error.reason = reason\n const texts = getTexts(reason, input, offset, line, column)\n error.message = texts.message\n error.excerpt = texts.excerpt\n if (texts.pointer) {\n error.pointer = texts.pointer\n error.location = {\n start: {\n column,\n line,\n offset\n }\n }\n }\n return error\n}\n\nfunction parseNative (input, reviver) { // eslint-disable-line no-unused-vars\n try {\n return JSON.parse(input, reviver)\n } catch (error) {\n throw improveNativeError(input, error)\n }\n}\n\n/* globals navigator, process, parseCustom, parseNative */\n\nconst isSafari = typeof navigator !== 'undefined' && /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor)\nconst oldNode = typeof process !== 'undefined' && process.version.startsWith('v4.')\n\nfunction needsCustomParser (options) {\n return options.ignoreComments || options.ignoreTrailingCommas ||\n options.allowSingleQuotedStrings || options.allowDuplicateObjectKeys === false ||\n options.mode === 'cjson' || options.mode === 'json5' || isSafari || oldNode\n}\n\nfunction getReviver (options) {\n if (typeof options === 'function') {\n return options\n } else if (options) {\n return options.reviver\n }\n}\n\nfunction parse (input, options) { // eslint-disable-line no-unused-vars\n options || (options = {})\n return needsCustomParser(options)\n ? parseCustom(input, options)\n : parseNative(input, getReviver(options))\n}\n\n exports.parse = parse\n exports.tokenize = tokenize\n exports.pathToPointer = pathToPointer\n exports.pointerToPath = pointerToPath\n\n exports.parseNative = parseNative\n exports.parseCustom = parseCustom\n exports.getErrorTexts = getTexts\n\n Object.defineProperty(exports, '__esModule', { value: true })\n}));\n"]}
|