-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_test.go
534 lines (515 loc) · 51.9 KB
/
generate_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
package fuzz
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"strings"
"testing"
)
func TestGenerateFiles(t *testing.T) {
// Running in GitHub actions? Skip this
if os.Getenv("CI") == "true" {
t.Skip()
}
t.Helper()
err := os.MkdirAll("corpus", 0644)
if err != nil {
panic(err)
}
for i, d := range fuzzData {
err = ioutil.WriteFile(fmt.Sprintf("corpus/%d.txt", i), []byte(d.arg), 0o644)
if err != nil {
panic(err)
}
for j, d2 := range d.want {
err = ioutil.WriteFile(fmt.Sprintf("corpus/%d-%d.txt", i, j), []byte(d2), 0o644)
if err != nil {
panic(err)
}
}
}
}
// Same as testData in reader_test.go
var fuzzData = []struct {
arg string
want []json.RawMessage
}{
{
// This was found using https://github.com/dvyukov/go-fuzz
"[`",
nil,
},
{
"",
nil,
},
{
// This is quite ambigious, as that could either be a small array or the index.
"first[0]",
[]json.RawMessage{
[]byte(`[0]`),
},
},
{
"obj[{i: a}, j]",
[]json.RawMessage{
[]byte(`[{"i":"a"},"j"]`),
},
},
{
`{bigint: 50n}`,
[]json.RawMessage{
[]byte(`{"bigint":50}`),
},
},
{
`{bigint: 5030n}`,
[]json.RawMessage{
[]byte(`{"bigint":5030}`),
},
},
{
`{bigint: 505050n}`,
[]json.RawMessage{
[]byte(`{"bigint":505050}`),
},
},
{
// -0x505050n sadly does not work because the lexer doesn't support it
`{notbigint: -0x505050}`,
[]json.RawMessage{
[]byte(`{"notbigint":-5263440}`),
},
},
{
`[-1, 0, 30, +15, 17n]`,
[]json.RawMessage{
[]byte(`[-1,0,30,15,17]`),
},
},
{
`[-15, -30, -0n, 14, 3]`,
[]json.RawMessage{
[]byte(`[-15,-30,-0,14,3]`),
},
},
{
`[-0x3, -0o30, 0x0000000000, 0o0000000000, 0x14, 0o3]`,
[]json.RawMessage{
[]byte(`[-3,-24,0,0,20,3]`),
},
},
{
`{[[undefined, null, ]]}`,
[]json.RawMessage{
[]byte(`[[null,null]]`),
},
},
{
"[NaN]",
[]json.RawMessage{
[]byte(`[null]`),
},
},
{
"[0B101, 0O73, 0x75]",
[]json.RawMessage{
[]byte("[5,59,117]"),
},
},
{
"[0B101, -0O73, 0x75]",
[]json.RawMessage{
[]byte("[5,-59,117]"),
},
},
{
`[ 5.56789e+0 ,]`,
[]json.RawMessage{
[]byte(`[5.56789e+0]`),
},
},
{
`<script>
StackExchange.ready(function () {
$('.js-select-tag-badge').click(function (e) {
StackExchange.user.nextBadgePopup.load($(this), 101010, /*isTagBadge*/true);
e.preventDefault();
});
var graphData = [21455,21455,21490,21500,21590,21610,21640,21665,21680,21690,21710,21718,21728,21908,21961,22006,22006,22026,22081,22091,22136,22176,22186,22276,22276,22301,22331,22366,22386,22416,22451,22461,22481,22531,22616,22616,22661,22691,22691,22691,22701,22711,22761,22761,22841,22871,22871,22931,22956,23016,23066,23091,23101,23176,23231,23261,23331,23371,23371,23396,23426,23436,23456,23456,23466,23576,23586,23596,23591,23641,23694,23738,23748,23783,23838,23838,23858,23913,23958,23968,23993,24028,24073,24128,24138,24148,24158,24178,24208,24373,24438,24468,24478,24488,24603,24623,24688,24708,24708,24708,24718,24783,24858,24903,24958,25008,25008,25028,25048,25048,25133,25173,25213,25248,25248,25258,25288,25308,25308,25393,25393,25418,25428,25458,25488,25488,25513,25523,25558,25583,25608,25628,25648,25668,25668,25668,25713,25723,25733,25788,25833,25903,25928,25938,25948,25978,25988,26013,26013,26038,26048,26088,26098,26118,26138,26178,26203,26263,26288,26318,26348,26428,26438,26448,26458,26478,26488,26508,26518,26528,26538,26538,26548,26578,26703,26743,26753,26848,26873,26893,26923,26943,26953,27063,27118,27128,27138,27158,27158,27188,27218,27238,27248,27258,27288,27317,27337,27357,27372,27382,27392,27432,27455,27490,27520,27540,27575,27575,27670,27720,27730,27775,27825,27835,27885,27970,27990,28010,28030,28030,28050,28085,28095,28125,28155,28190,28190,28240,28250,28260,28260,28260,28305,28315,28360,28405,28415,28425,28465,28525,28580,28620,28675,28715,28750,28790,28820,28850,28870,28890,28930,29040,29110,29165,29155,29255,29265,29330,29420,29495,29560,29575,29635,29700,29720,29740,29750,29835,29845,29875,29970,30030,30030,30040,30135,30280,30310,30340,30380,30435,30465,30635,30660,30670,30940,31140,31310,31395,31465,31520,31575,31700,31755,31775,31785,31880,31980,32070,32193,32213,32258,32258,32303,32398,32453,32483,32513,32593,32658,32713,32793,32828,32848,32913,32998,33043,33128,33308,33318,33388,33396,33441,33481,33556,33626,33646,33691,33761,33851,33956,34011,34096,34121,34186,34291,34301,34356,34501,34526,34526,34561,34561,34596,34651,34716,34726,34766,34811,34881,34906,34961,35026,35056,35076,35086,35121,35161,35241,35291,35331,35331,35341,35391,35496,35571,35601,35656,35711,35761,35771,35801,35911,35946,35986,36036,36046,36091,36121,36171,36171,36181,36181,36201,36231,36341,36381,36391,36506,36571,36616,36671,36701,36709,36749,36759,36779,36789,36819,36874,36904,36924,36969,37049,37104,37144,37314,37354,37402,37442,37452,37497,37521,37556,37566,37575,37585,37595,37615,37710,37740,37845,37895,37905,37945,38015,38085,38180,38225,38370,38395,38465,38510,38570,38590,38610,38630,38630,38640,38600,38630,38740,38860,38880,39028,39070,39110,39215,39270,39325,39445,39545,39600,39660,39695,39855,39930,39940,39960,39960,40055,40095,40140,40160,40245,40245,40265,40350,40465,40710,40830,40930,40960,41005,41067,41077,41132,41197,41207,41252,41287,41332,41342,41577,41427,41452,41472,41482,41536,41726,41756,41766,41801,41826,41846,41846,41861,41931,42040,42050,42090,42120,42180,42230,42290,42324,42364,42424,42461,42486,42526,42591,42676,42716,42726,42736,42756,42786,42796,42816,42836,42836,42846,42866,42866,42921,42941,42951,42951,42991,43011,43041,43041,43061,43091,43091,43101,43139,43179,43239,43314,43419,43459,43487,43507,43537,43557,43617,43702,43737,43757,43817,43952,43992,44082,44107,44167,44222,44272,44307,44352,44362,44382,44392,44422,44557,44617,44655,44685,44715,44745,44800,44820,44885,45000,45070,45155,45185,45255,45370,45500,45665,45740,45760,45775,45775,45785,45795,45840,45880,45925,45925,45935,45990,46040,46050,46085,46128,46138,46182,46217,46282,46312,46392,46402,46432,46432,46482,46527,46742,46817,46877,46987,47047,47077,47097,47137,47172,47202,47202,47232,47257,47312,47352,47362,47402,47437,47467,47522,47532,47562,47572,47617,47677,47677,47767,47775,47795,47830,47840,47850,47880,47890,47900,47965,48015,48035,48035,48080,48120,48190,48240,48300,48335,48345,48370,48415,48530,48680,48830,48885,48950,48960,49045,49065,49075,49129,49249,49279,49344,49379,49419,49449,49479,49534,49544,49564,49574,49573,49583,49623,49643,49663,49673,49693,49713,49778,49838,49868,49923,50018,50058,50163,50263,50283,50343,50343,50383,50453,50583,50828,50888,51053,51073,51093,51123,51133,51153,51333,51483,51573,51593,51593,51668,51851,51921,52016,52034,52054,52094,52179,52179,52248,52308,52318,52348,52388,52428,52438,52458,52543,52563,52638,52708,52818,52848,52928,52983,52983,53028,53133,53311,53451,53531,53541,53561,53591,53621,53661,53746,53795,53855,53865,53995,54090,54130,54170,54255,54310,54335,54405,54440,54480,54540,54570,54660,54660,54670,54720,54760,54890,54910,54985,55050,55075,55145,55240,55265,55265,55310,55340,55420,55465,55550,55620,55640,55670,55735,55735,55745,55785,55815,55875,55924,55954,55964,56014,56044,56104,56159,56329,56427,56492,56522,56552,56592,56632,56652,56727,56747,56766,56811,56886,56916,56946,56986,57016,57036,57086,57106,57136,57166,57176,57176,57261,57320,57405,57445,57525,57575,57635,57735,57840,57850,57900,57890,57900,57920,57940,57970,58020,58145,58175,58175,58185,58235,58330,58455,58540,58584,58584,58614,58774,58813,58853,58873,58883,58893,58893,58923,58933,58943,58978,59033,59118,59158,59168,59298,59338,59468,59543,59553,59588,59628,59688,59748,59758,59838,59883,59948,59998,60028,60098,60183,60208,60218,60237,60392,60507,60517,60607,60687,60892,60762,60862,60927,61092,61137,61217,61217,61227,61237,61237,61302,61332,61412,61472,61472,61502,61567,61642,61652,61662,61682,61682,61682,61732,61787,61847,61917,61937,61977,62182,62367,62487,62527,62592,62602,62622,62622,62642,62682,62702,62767,62797,62897,62957,63022,63097,63177,63217,63217,63217,63237,63312,63432,63507,63537,63557,63581,63691,63731,63751,63781,63801,63841,63896,64071,64151,64151,64161,64221,64246,64281,64311,64331,64406,64516,64616,64706,64776,64836,64974,65059,65184,65219,65274,65294,65349,65389,65439,65554,65574,65604,65649,65669,65719,65748,65823,65843,65873,65883,65988,66038,66128,66163,66208,66228,66248,66248,66288,66298,66378,66428,66428,66458,66493,66523,66533,66588,66618,66653,66662,66682,66732,66817,66856,66866,66876,66896,66946,67006,67106,67166,67241,67321,67381,67401,67446,67516,67576,67640,67709,67739,67784,67804,67844,67854,67873,67893,67902,67932,67952,67992,68022,68022,68022,68022,68042,68107,68115,68210,68280,68300,68340,68358,68398,68448,68478,68508,68558,68588,68618,68673,68723,68763,68828,68838,68893,68943,69058,69108,69223,69258,69268,69303,69363,69393,69413,69458,69468,69523,69558,69693,69733,69743,69793,69843,69873,69883,69923,69952,70002,70012,70012,70032,70052,70127,70177,70237,70332,70382,70402,70437,70502,70542,70572,70622,70677,70677,70742,70772,70781,70791,70821,70851,70876,70896,70906,70936,70946,70976,70996,71006,71016,71066,71126,71191,71241,71261,71316,71326,71336,71396,71416,71436,71476,71531,71551,71590,71620,71675,71695,71745,71785,71825,71835,71885,71954,72037,72112,72112,72170,72235,72305,72325,72385,72425,72465,72520,72540,72560,72615,72660,72700,72710,72754,72764,72781,72850,72870,72935,72970,73070,73165,73225,73350,73360,73405,73445,73485,73505,73545,73585,73655,73695,73730,73780,73809,73834,73874,73904,73934,73964,73979,74009,74039,74079,74118,74153,74173,74248,74313,74363,74413,74423,74433,74443,74512,74541,74628,74728,74778,74798,74808,74828,74898,74938,74973,74983,75022,75052,75072,75162,75172,75201,75231,75309,75368,75388,75468,75618,75678,75703,75829,75866,75876,75936,75976,76006,76056,76161,76191,76201,76210,76220,76240,76295,76333,76343,76342,76370,76390,76400,76445,76465,76520,76545,76625,76655,76685,76695,76745,76755,76780,76840,76870,76930,76964,77024,77044,77054,77114,77124,77134,77183,77223,77298,77308,77348,77438,77467,77497,77582,77582,77622,77642,77672,77712,77741,77801,77811,77830,77870,77890,77925,77944,77989,78009,78059,78079,78099,78149,78169,78189,78234,78234,78274,78284,78354,78394,78454,78474,78494,78524,78564,78602,78647,78677,78702,78732,78762,78782,78811,78841,78881,78906,78906,78946,78964,78974,79004,79114,79144,79164,79184,79268,79342,79342,79362,79372,79410,79523,79608,79648,79678,79700,79720,79750,79795,79855,79875,79905,79955,79975,80020,80070,80110,80159,80199,80229,80289,80319,80349,80389,80409,80439,80469,80519,80604,80674,80704,80724,80734,80859,80889,80919,80959,81019,81094,81164,81174,81194,81224,81254,81304,81374,81394,81394,81414,81444,81474,81504,81564,81614,81649,81659,81699,81719,81729,81759,81799,81839,81849,81859,81949,81989,82038,82078,82143,82198,82238,82283,82333,82393,82422,82462,82482,82512,82617,82667,82757,82787,82817,82827,82892,82962,83000,83060,83100,83170,83190,83220,83260,83300,83370,83390,83410,83440,83460,83515,83560,83630,83660,83690,83700,83730,83785,83843,83903,83933,84008,84018,84018,84038,84048,84088,84183,84213,84223,84233];
StackExchange.user.renderMiniGraph(graphData);
StackExchange.user.userCardMessages.nextTagBadgeInfo = [
'<h4 class="popup-title">Bronze dictionary tag badge</h4>',
'<div class="popup-white">',
'<p>Earn at least 100 total score for at least 20 non-community wiki answers in the dictionary tag</p>',
'</div>'
].join('');
});
</script>`,
[]json.RawMessage{
[]byte(`[21455,21455,21490,21500,21590,21610,21640,21665,21680,21690,21710,21718,21728,21908,21961,22006,22006,22026,22081,22091,22136,22176,22186,22276,22276,22301,22331,22366,22386,22416,22451,22461,22481,22531,22616,22616,22661,22691,22691,22691,22701,22711,22761,22761,22841,22871,22871,22931,22956,23016,23066,23091,23101,23176,23231,23261,23331,23371,23371,23396,23426,23436,23456,23456,23466,23576,23586,23596,23591,23641,23694,23738,23748,23783,23838,23838,23858,23913,23958,23968,23993,24028,24073,24128,24138,24148,24158,24178,24208,24373,24438,24468,24478,24488,24603,24623,24688,24708,24708,24708,24718,24783,24858,24903,24958,25008,25008,25028,25048,25048,25133,25173,25213,25248,25248,25258,25288,25308,25308,25393,25393,25418,25428,25458,25488,25488,25513,25523,25558,25583,25608,25628,25648,25668,25668,25668,25713,25723,25733,25788,25833,25903,25928,25938,25948,25978,25988,26013,26013,26038,26048,26088,26098,26118,26138,26178,26203,26263,26288,26318,26348,26428,26438,26448,26458,26478,26488,26508,26518,26528,26538,26538,26548,26578,26703,26743,26753,26848,26873,26893,26923,26943,26953,27063,27118,27128,27138,27158,27158,27188,27218,27238,27248,27258,27288,27317,27337,27357,27372,27382,27392,27432,27455,27490,27520,27540,27575,27575,27670,27720,27730,27775,27825,27835,27885,27970,27990,28010,28030,28030,28050,28085,28095,28125,28155,28190,28190,28240,28250,28260,28260,28260,28305,28315,28360,28405,28415,28425,28465,28525,28580,28620,28675,28715,28750,28790,28820,28850,28870,28890,28930,29040,29110,29165,29155,29255,29265,29330,29420,29495,29560,29575,29635,29700,29720,29740,29750,29835,29845,29875,29970,30030,30030,30040,30135,30280,30310,30340,30380,30435,30465,30635,30660,30670,30940,31140,31310,31395,31465,31520,31575,31700,31755,31775,31785,31880,31980,32070,32193,32213,32258,32258,32303,32398,32453,32483,32513,32593,32658,32713,32793,32828,32848,32913,32998,33043,33128,33308,33318,33388,33396,33441,33481,33556,33626,33646,33691,33761,33851,33956,34011,34096,34121,34186,34291,34301,34356,34501,34526,34526,34561,34561,34596,34651,34716,34726,34766,34811,34881,34906,34961,35026,35056,35076,35086,35121,35161,35241,35291,35331,35331,35341,35391,35496,35571,35601,35656,35711,35761,35771,35801,35911,35946,35986,36036,36046,36091,36121,36171,36171,36181,36181,36201,36231,36341,36381,36391,36506,36571,36616,36671,36701,36709,36749,36759,36779,36789,36819,36874,36904,36924,36969,37049,37104,37144,37314,37354,37402,37442,37452,37497,37521,37556,37566,37575,37585,37595,37615,37710,37740,37845,37895,37905,37945,38015,38085,38180,38225,38370,38395,38465,38510,38570,38590,38610,38630,38630,38640,38600,38630,38740,38860,38880,39028,39070,39110,39215,39270,39325,39445,39545,39600,39660,39695,39855,39930,39940,39960,39960,40055,40095,40140,40160,40245,40245,40265,40350,40465,40710,40830,40930,40960,41005,41067,41077,41132,41197,41207,41252,41287,41332,41342,41577,41427,41452,41472,41482,41536,41726,41756,41766,41801,41826,41846,41846,41861,41931,42040,42050,42090,42120,42180,42230,42290,42324,42364,42424,42461,42486,42526,42591,42676,42716,42726,42736,42756,42786,42796,42816,42836,42836,42846,42866,42866,42921,42941,42951,42951,42991,43011,43041,43041,43061,43091,43091,43101,43139,43179,43239,43314,43419,43459,43487,43507,43537,43557,43617,43702,43737,43757,43817,43952,43992,44082,44107,44167,44222,44272,44307,44352,44362,44382,44392,44422,44557,44617,44655,44685,44715,44745,44800,44820,44885,45000,45070,45155,45185,45255,45370,45500,45665,45740,45760,45775,45775,45785,45795,45840,45880,45925,45925,45935,45990,46040,46050,46085,46128,46138,46182,46217,46282,46312,46392,46402,46432,46432,46482,46527,46742,46817,46877,46987,47047,47077,47097,47137,47172,47202,47202,47232,47257,47312,47352,47362,47402,47437,47467,47522,47532,47562,47572,47617,47677,47677,47767,47775,47795,47830,47840,47850,47880,47890,47900,47965,48015,48035,48035,48080,48120,48190,48240,48300,48335,48345,48370,48415,48530,48680,48830,48885,48950,48960,49045,49065,49075,49129,49249,49279,49344,49379,49419,49449,49479,49534,49544,49564,49574,49573,49583,49623,49643,49663,49673,49693,49713,49778,49838,49868,49923,50018,50058,50163,50263,50283,50343,50343,50383,50453,50583,50828,50888,51053,51073,51093,51123,51133,51153,51333,51483,51573,51593,51593,51668,51851,51921,52016,52034,52054,52094,52179,52179,52248,52308,52318,52348,52388,52428,52438,52458,52543,52563,52638,52708,52818,52848,52928,52983,52983,53028,53133,53311,53451,53531,53541,53561,53591,53621,53661,53746,53795,53855,53865,53995,54090,54130,54170,54255,54310,54335,54405,54440,54480,54540,54570,54660,54660,54670,54720,54760,54890,54910,54985,55050,55075,55145,55240,55265,55265,55310,55340,55420,55465,55550,55620,55640,55670,55735,55735,55745,55785,55815,55875,55924,55954,55964,56014,56044,56104,56159,56329,56427,56492,56522,56552,56592,56632,56652,56727,56747,56766,56811,56886,56916,56946,56986,57016,57036,57086,57106,57136,57166,57176,57176,57261,57320,57405,57445,57525,57575,57635,57735,57840,57850,57900,57890,57900,57920,57940,57970,58020,58145,58175,58175,58185,58235,58330,58455,58540,58584,58584,58614,58774,58813,58853,58873,58883,58893,58893,58923,58933,58943,58978,59033,59118,59158,59168,59298,59338,59468,59543,59553,59588,59628,59688,59748,59758,59838,59883,59948,59998,60028,60098,60183,60208,60218,60237,60392,60507,60517,60607,60687,60892,60762,60862,60927,61092,61137,61217,61217,61227,61237,61237,61302,61332,61412,61472,61472,61502,61567,61642,61652,61662,61682,61682,61682,61732,61787,61847,61917,61937,61977,62182,62367,62487,62527,62592,62602,62622,62622,62642,62682,62702,62767,62797,62897,62957,63022,63097,63177,63217,63217,63217,63237,63312,63432,63507,63537,63557,63581,63691,63731,63751,63781,63801,63841,63896,64071,64151,64151,64161,64221,64246,64281,64311,64331,64406,64516,64616,64706,64776,64836,64974,65059,65184,65219,65274,65294,65349,65389,65439,65554,65574,65604,65649,65669,65719,65748,65823,65843,65873,65883,65988,66038,66128,66163,66208,66228,66248,66248,66288,66298,66378,66428,66428,66458,66493,66523,66533,66588,66618,66653,66662,66682,66732,66817,66856,66866,66876,66896,66946,67006,67106,67166,67241,67321,67381,67401,67446,67516,67576,67640,67709,67739,67784,67804,67844,67854,67873,67893,67902,67932,67952,67992,68022,68022,68022,68022,68042,68107,68115,68210,68280,68300,68340,68358,68398,68448,68478,68508,68558,68588,68618,68673,68723,68763,68828,68838,68893,68943,69058,69108,69223,69258,69268,69303,69363,69393,69413,69458,69468,69523,69558,69693,69733,69743,69793,69843,69873,69883,69923,69952,70002,70012,70012,70032,70052,70127,70177,70237,70332,70382,70402,70437,70502,70542,70572,70622,70677,70677,70742,70772,70781,70791,70821,70851,70876,70896,70906,70936,70946,70976,70996,71006,71016,71066,71126,71191,71241,71261,71316,71326,71336,71396,71416,71436,71476,71531,71551,71590,71620,71675,71695,71745,71785,71825,71835,71885,71954,72037,72112,72112,72170,72235,72305,72325,72385,72425,72465,72520,72540,72560,72615,72660,72700,72710,72754,72764,72781,72850,72870,72935,72970,73070,73165,73225,73350,73360,73405,73445,73485,73505,73545,73585,73655,73695,73730,73780,73809,73834,73874,73904,73934,73964,73979,74009,74039,74079,74118,74153,74173,74248,74313,74363,74413,74423,74433,74443,74512,74541,74628,74728,74778,74798,74808,74828,74898,74938,74973,74983,75022,75052,75072,75162,75172,75201,75231,75309,75368,75388,75468,75618,75678,75703,75829,75866,75876,75936,75976,76006,76056,76161,76191,76201,76210,76220,76240,76295,76333,76343,76342,76370,76390,76400,76445,76465,76520,76545,76625,76655,76685,76695,76745,76755,76780,76840,76870,76930,76964,77024,77044,77054,77114,77124,77134,77183,77223,77298,77308,77348,77438,77467,77497,77582,77582,77622,77642,77672,77712,77741,77801,77811,77830,77870,77890,77925,77944,77989,78009,78059,78079,78099,78149,78169,78189,78234,78234,78274,78284,78354,78394,78454,78474,78494,78524,78564,78602,78647,78677,78702,78732,78762,78782,78811,78841,78881,78906,78906,78946,78964,78974,79004,79114,79144,79164,79184,79268,79342,79342,79362,79372,79410,79523,79608,79648,79678,79700,79720,79750,79795,79855,79875,79905,79955,79975,80020,80070,80110,80159,80199,80229,80289,80319,80349,80389,80409,80439,80469,80519,80604,80674,80704,80724,80734,80859,80889,80919,80959,81019,81094,81164,81174,81194,81224,81254,81304,81374,81394,81394,81414,81444,81474,81504,81564,81614,81649,81659,81699,81719,81729,81759,81799,81839,81849,81859,81949,81989,82038,82078,82143,82198,82238,82283,82333,82393,82422,82462,82482,82512,82617,82667,82757,82787,82817,82827,82892,82962,83000,83060,83100,83170,83190,83220,83260,83300,83370,83390,83410,83440,83460,83515,83560,83630,83660,83690,83700,83730,83785,83843,83903,83933,84008,84018,84018,84038,84048,84088,84183,84213,84223,84233]`),
[]byte(`["<h4 class=\"popup-title\">Bronze dictionary tag badge</h4>","<div class=\"popup-white\">","<p>Earn at least 100 total score for at least 20 non-community wiki answers in the dictionary tag</p>","</div>"]`),
},
},
{
`{}[]{ [21455,21455,21490,21500,21590,21610,21640,21665,21680,21690,21710,21718,21728,21908,21961,22006,22006,22026,22081,22091,22136,22176,22186,22276,22276,22301,22331,22366,22386,22416,22451,22461,22481,22531,22616,22616,22661,22691,22691,22691,22701,22711,22761,22761,22841,22871,22871,22931,22956,23016,23066,23091,23101,23176,23231,23261,23331,23371,23371,23396,23426,23436,23456,23456,23466,23576,23586,23596,23591,23641,23694,23738,23748,23783,23838,23838,23858,23913,23958,23968,23993,24028,24073,24128,24138,24148,24158,24178,24208,24373,24438,24468,24478,24488,24603,24623,24688,24708,24708,24708,24718,24783,24858,24903,24958,25008,25008,25028,25048,25048,25133,25173,25213,25248,25248,25258,25288,25308,25308,25393,25393,25418,25428,25458,25488,25488,25513,25523,25558,25583,25608,25628,25648,25668,25668,25668,25713,25723,25733,25788,25833,25903,25928,25938,25948,25978,25988,26013,26013,26038,26048,26088,26098,26118,26138,26178,26203,26263,26288,26318,26348,26428,26438,26448,26458,26478,26488,26508,26518,26528,26538,26538,26548,26578,26703,26743,26753,26848,26873,26893,26923,26943,26953,27063,27118,27128,27138,27158,27158,27188,27218,27238,27248,27258,27288,27317,27337,27357,27372,27382,27392,27432,27455,27490,27520,27540,27575,27575,27670,27720,27730,27775,27825,27835,27885,27970,27990,28010,28030,28030,28050,28085,28095,28125,28155,28190,28190,28240,28250,28260,28260,28260,28305,28315,28360,28405,28415,28425,28465,28525,28580,28620,28675,28715,28750,28790,28820,28850,28870,28890,28930,29040,29110,29165,29155,29255,29265,29330,29420,29495,29560,29575,29635,29700,29720,29740,29750,29835,29845,29875,29970,30030,30030,30040,30135,30280,30310,30340,30380,30435,30465,30635,30660,30670,30940,31140,31310,31395,31465,31520,31575,31700,31755,31775,31785,31880,31980,32070,32193,32213,32258,32258,32303,32398,32453,32483,32513,32593,32658,32713,32793,32828,32848,32913,32998,33043,33128,33308,33318,33388,33396,33441,33481,33556,33626,33646,33691,33761,33851,33956,34011,34096,34121,34186,34291,34301,34356,34501,34526,34526,34561,34561,34596,34651,34716,34726,34766,34811,34881,34906,34961,35026,35056,35076,35086,35121,35161,35241,35291,35331,35331,35341,35391,35496,35571,35601,35656,35711,35761,35771,35801,35911,35946,35986,36036,36046,36091,36121,36171,36171,36181,36181,36201,36231,36341,36381,36391,36506,36571,36616,36671,36701,36709,36749,36759,36779,36789,36819,36874,36904,36924,36969,37049,37104,37144,37314,37354,37402,37442,37452,37497,37521,37556,37566,37575,37585,37595,37615,37710,37740,37845,37895,37905,37945,38015,38085,38180,38225,38370,38395,38465,38510,38570,38590,38610,38630,38630,38640,38600,38630,38740,38860,38880,39028,39070,39110,39215,39270,39325,39445,39545,39600,39660,39695,39855,39930,39940,39960,39960,40055,40095,40140,40160,40245,40245,40265,40350,40465,40710,40830,40930,40960,41005,41067,41077,41132,41197,41207,41252,41287,41332,41342,41577,41427,41452,41472,41482,41536,41726,41756,41766,41801,41826,41846,41846,41861,41931,42040,42050,42090,42120,42180,42230,42290,42324,42364,42424,42461,42486,42526,42591,42676,42716,42726,42736,42756,42786,42796,42816,42836,42836,42846,42866,42866,42921,42941,42951,42951,42991,43011,43041,43041,43061,43091,43091,43101,43139,43179,43239,43314,43419,43459,43487,43507,43537,43557,43617,43702,43737,43757,43817,43952,43992,44082,44107,44167,44222,44272,44307,44352,44362,44382,44392,44422,44557,44617,44655,44685,44715,44745,44800,44820,44885,45000,45070,45155,45185,45255,45370,45500,45665,45740,45760,45775,45775,45785,45795,45840,45880,45925,45925,45935,45990,46040,46050,46085,46128,46138,46182,46217,46282,46312,46392,46402,46432,46432,46482,46527,46742,46817,46877,46987,47047,47077,47097,47137,47172,47202,47202,47232,47257,47312,47352,47362,47402,47437,47467,47522,47532,47562,47572,47617,47677,47677,47767,47775,47795,47830,47840,47850,47880,47890,47900,47965,48015,48035,48035,48080,48120,48190,48240,48300,48335,48345,48370,48415,48530,48680,48830,48885,48950,48960,49045,49065,49075,49129,49249,49279,49344,49379,49419,49449,49479,49534,49544,49564,49574,49573,49583,49623,49643,49663,49673,49693,49713,49778,49838,49868,49923,50018,50058,50163,50263,50283,50343,50343,50383,50453,50583,50828,50888,51053,51073,51093,51123,51133,51153,51333,51483,51573,51593,51593,51668,51851,51921,52016,52034,52054,52094,52179,52179,52248,52308,52318,52348,52388,52428,52438,52458,52543,52563,52638,52708,52818,52848,52928,52983,52983,53028,53133,53311,53451,53531,53541,53561,53591,53621,53661,53746,53795,53855,53865,53995,54090,54130,54170,54255,54310,54335,54405,54440,54480,54540,54570,54660,54660,54670,54720,54760,54890,54910,54985,55050,55075,55145,55240,55265,55265,55310,55340,55420,55465,55550,55620,55640,55670,55735,55735,55745,55785,55815,55875,55924,55954,55964,56014,56044,56104,56159,56329,56427,56492,56522,56552,56592,56632,56652,56727,56747,56766,56811,56886,56916,56946,56986,57016,57036,57086,57106,57136,57166,57176,57176,57261,57320,57405,57445,57525,57575,57635,57735,57840,57850,57900,57890,57900,57920,57940,57970,58020,58145,58175,58175,58185,58235,58330,58455,58540,58584,58584,58614,58774,58813,58853,58873,58883,58893,58893,58923,58933,58943,58978,59033,59118,59158,59168,59298,59338,59468,59543,59553,59588,59628,59688,59748,59758,59838,59883,59948,59998,60028,60098,60183,60208,60218,60237,60392,60507,60517,60607,60687,60892,60762,60862,60927,61092,61137,61217,61217,61227,61237,61237,61302,61332,61412,61472,61472,61502,61567,61642,61652,61662,61682,61682,61682,61732,61787,61847,61917,61937,61977,62182,62367,62487,62527,62592,62602,62622,62622,62642,62682,62702,62767,62797,62897,62957,63022,63097,63177,63217,63217,63217,63237,63312,63432,63507,63537,63557,63581,63691,63731,63751,63781,63801,63841,63896,64071,64151,64151,64161,64221,64246,64281,64311,64331,64406,64516,64616,64706,64776,64836,64974,65059,65184,65219,65274,65294,65349,65389,65439,65554,65574,65604,65649,65669,65719,65748,65823,65843,65873,65883,65988,66038,66128,66163,66208,66228,66248,66248,66288,66298,66378,66428,66428,66458,66493,66523,66533,66588,66618,66653,66662,66682,66732,66817,66856,66866,66876,66896,66946,67006,67106,67166,67241,67321,67381,67401,67446,67516,67576,67640,67709,67739,67784,67804,67844,67854,67873,67893,67902,67932,67952,67992,68022,68022,68022,68022,68042,68107,68115,68210,68280,68300,68340,68358,68398,68448,68478,68508,68558,68588,68618,68673,68723,68763,68828,68838,68893,68943,69058,69108,69223,69258,69268,69303,69363,69393,69413,69458,69468,69523,69558,69693,69733,69743,69793,69843,69873,69883,69923,69952,70002,70012,70012,70032,70052,70127,70177,70237,70332,70382,70402,70437,70502,70542,70572,70622,70677,70677,70742,70772,70781,70791,70821,70851,70876,70896,70906,70936,70946,70976,70996,71006,71016,71066,71126,71191,71241,71261,71316,71326,71336,71396,71416,71436,71476,71531,71551,71590,71620,71675,71695,71745,71785,71825,71835,71885,71954,72037,72112,72112,72170,72235,72305,72325,72385,72425,72465,72520,72540,72560,72615,72660,72700,72710,72754,72764,72781,72850,72870,72935,72970,73070,73165,73225,73350,73360,73405,73445,73485,73505,73545,73585,73655,73695,73730,73780,73809,73834,73874,73904,73934,73964,73979,74009,74039,74079,74118,74153,74173,74248,74313,74363,74413,74423,74433,74443,74512,74541,74628,74728,74778,74798,74808,74828,74898,74938,74973,74983,75022,75052,75072,75162,75172,75201,75231,75309,75368,75388,75468,75618,75678,75703,75829,75866,75876,75936,75976,76006,76056,76161,76191,76201,76210,76220,76240,76295,76333,76343,76342,76370,76390,76400,76445,76465,76520,76545,76625,76655,76685,76695,76745,76755,76780,76840,76870,76930,76964,77024,77044,77054,77114,77124,77134,77183,77223,77298,77308,77348,77438,77467,77497,77582,77582,77622,77642,77672,77712,77741,77801,77811,77830,77870,77890,77925,77944,77989,78009,78059,78079,78099,78149,78169,78189,78234,78234,78274,78284,78354,78394,78454,78474,78494,78524,78564,78602,78647,78677,78702,78732,78762,78782,78811,78841,78881,78906,78906,78946,78964,78974,79004,79114,79144,79164,79184,79268,79342,79342,79362,79372,79410,79523,79608,79648,79678,79700,79720,79750,79795,79855,79875,79905,79955,79975,80020,80070,80110,80159,80199,80229,80289,80319,80349,80389,80409,80439,80469,80519,80604,80674,80704,80724,80734,80859,80889,80919,80959,81019,81094,81164,81174,81194,81224,81254,81304,81374,81394,81394,81414,81444,81474,81504,81564,81614,81649,81659,81699,81719,81729,81759,81799,81839,81849,81859,81949,81989,82038,82078,82143,82198,82238,82283,82333,82393,82422,82462,82482,82512,82617,82667,82757,82787,82817,82827,82892,82962,83000,83060,83100,83170,83190,83220,83260,83300,83370,83390,83410,83440,83460,83515,83560,83630,83660,83690,83700,83730,83785,83843,83903,83933,84008,84018,84018,84038,84048,84088,84183,84213,84223,84233]}`,
[]json.RawMessage{
[]byte(`{}`),
[]byte(`[]`),
[]byte(`[21455,21455,21490,21500,21590,21610,21640,21665,21680,21690,21710,21718,21728,21908,21961,22006,22006,22026,22081,22091,22136,22176,22186,22276,22276,22301,22331,22366,22386,22416,22451,22461,22481,22531,22616,22616,22661,22691,22691,22691,22701,22711,22761,22761,22841,22871,22871,22931,22956,23016,23066,23091,23101,23176,23231,23261,23331,23371,23371,23396,23426,23436,23456,23456,23466,23576,23586,23596,23591,23641,23694,23738,23748,23783,23838,23838,23858,23913,23958,23968,23993,24028,24073,24128,24138,24148,24158,24178,24208,24373,24438,24468,24478,24488,24603,24623,24688,24708,24708,24708,24718,24783,24858,24903,24958,25008,25008,25028,25048,25048,25133,25173,25213,25248,25248,25258,25288,25308,25308,25393,25393,25418,25428,25458,25488,25488,25513,25523,25558,25583,25608,25628,25648,25668,25668,25668,25713,25723,25733,25788,25833,25903,25928,25938,25948,25978,25988,26013,26013,26038,26048,26088,26098,26118,26138,26178,26203,26263,26288,26318,26348,26428,26438,26448,26458,26478,26488,26508,26518,26528,26538,26538,26548,26578,26703,26743,26753,26848,26873,26893,26923,26943,26953,27063,27118,27128,27138,27158,27158,27188,27218,27238,27248,27258,27288,27317,27337,27357,27372,27382,27392,27432,27455,27490,27520,27540,27575,27575,27670,27720,27730,27775,27825,27835,27885,27970,27990,28010,28030,28030,28050,28085,28095,28125,28155,28190,28190,28240,28250,28260,28260,28260,28305,28315,28360,28405,28415,28425,28465,28525,28580,28620,28675,28715,28750,28790,28820,28850,28870,28890,28930,29040,29110,29165,29155,29255,29265,29330,29420,29495,29560,29575,29635,29700,29720,29740,29750,29835,29845,29875,29970,30030,30030,30040,30135,30280,30310,30340,30380,30435,30465,30635,30660,30670,30940,31140,31310,31395,31465,31520,31575,31700,31755,31775,31785,31880,31980,32070,32193,32213,32258,32258,32303,32398,32453,32483,32513,32593,32658,32713,32793,32828,32848,32913,32998,33043,33128,33308,33318,33388,33396,33441,33481,33556,33626,33646,33691,33761,33851,33956,34011,34096,34121,34186,34291,34301,34356,34501,34526,34526,34561,34561,34596,34651,34716,34726,34766,34811,34881,34906,34961,35026,35056,35076,35086,35121,35161,35241,35291,35331,35331,35341,35391,35496,35571,35601,35656,35711,35761,35771,35801,35911,35946,35986,36036,36046,36091,36121,36171,36171,36181,36181,36201,36231,36341,36381,36391,36506,36571,36616,36671,36701,36709,36749,36759,36779,36789,36819,36874,36904,36924,36969,37049,37104,37144,37314,37354,37402,37442,37452,37497,37521,37556,37566,37575,37585,37595,37615,37710,37740,37845,37895,37905,37945,38015,38085,38180,38225,38370,38395,38465,38510,38570,38590,38610,38630,38630,38640,38600,38630,38740,38860,38880,39028,39070,39110,39215,39270,39325,39445,39545,39600,39660,39695,39855,39930,39940,39960,39960,40055,40095,40140,40160,40245,40245,40265,40350,40465,40710,40830,40930,40960,41005,41067,41077,41132,41197,41207,41252,41287,41332,41342,41577,41427,41452,41472,41482,41536,41726,41756,41766,41801,41826,41846,41846,41861,41931,42040,42050,42090,42120,42180,42230,42290,42324,42364,42424,42461,42486,42526,42591,42676,42716,42726,42736,42756,42786,42796,42816,42836,42836,42846,42866,42866,42921,42941,42951,42951,42991,43011,43041,43041,43061,43091,43091,43101,43139,43179,43239,43314,43419,43459,43487,43507,43537,43557,43617,43702,43737,43757,43817,43952,43992,44082,44107,44167,44222,44272,44307,44352,44362,44382,44392,44422,44557,44617,44655,44685,44715,44745,44800,44820,44885,45000,45070,45155,45185,45255,45370,45500,45665,45740,45760,45775,45775,45785,45795,45840,45880,45925,45925,45935,45990,46040,46050,46085,46128,46138,46182,46217,46282,46312,46392,46402,46432,46432,46482,46527,46742,46817,46877,46987,47047,47077,47097,47137,47172,47202,47202,47232,47257,47312,47352,47362,47402,47437,47467,47522,47532,47562,47572,47617,47677,47677,47767,47775,47795,47830,47840,47850,47880,47890,47900,47965,48015,48035,48035,48080,48120,48190,48240,48300,48335,48345,48370,48415,48530,48680,48830,48885,48950,48960,49045,49065,49075,49129,49249,49279,49344,49379,49419,49449,49479,49534,49544,49564,49574,49573,49583,49623,49643,49663,49673,49693,49713,49778,49838,49868,49923,50018,50058,50163,50263,50283,50343,50343,50383,50453,50583,50828,50888,51053,51073,51093,51123,51133,51153,51333,51483,51573,51593,51593,51668,51851,51921,52016,52034,52054,52094,52179,52179,52248,52308,52318,52348,52388,52428,52438,52458,52543,52563,52638,52708,52818,52848,52928,52983,52983,53028,53133,53311,53451,53531,53541,53561,53591,53621,53661,53746,53795,53855,53865,53995,54090,54130,54170,54255,54310,54335,54405,54440,54480,54540,54570,54660,54660,54670,54720,54760,54890,54910,54985,55050,55075,55145,55240,55265,55265,55310,55340,55420,55465,55550,55620,55640,55670,55735,55735,55745,55785,55815,55875,55924,55954,55964,56014,56044,56104,56159,56329,56427,56492,56522,56552,56592,56632,56652,56727,56747,56766,56811,56886,56916,56946,56986,57016,57036,57086,57106,57136,57166,57176,57176,57261,57320,57405,57445,57525,57575,57635,57735,57840,57850,57900,57890,57900,57920,57940,57970,58020,58145,58175,58175,58185,58235,58330,58455,58540,58584,58584,58614,58774,58813,58853,58873,58883,58893,58893,58923,58933,58943,58978,59033,59118,59158,59168,59298,59338,59468,59543,59553,59588,59628,59688,59748,59758,59838,59883,59948,59998,60028,60098,60183,60208,60218,60237,60392,60507,60517,60607,60687,60892,60762,60862,60927,61092,61137,61217,61217,61227,61237,61237,61302,61332,61412,61472,61472,61502,61567,61642,61652,61662,61682,61682,61682,61732,61787,61847,61917,61937,61977,62182,62367,62487,62527,62592,62602,62622,62622,62642,62682,62702,62767,62797,62897,62957,63022,63097,63177,63217,63217,63217,63237,63312,63432,63507,63537,63557,63581,63691,63731,63751,63781,63801,63841,63896,64071,64151,64151,64161,64221,64246,64281,64311,64331,64406,64516,64616,64706,64776,64836,64974,65059,65184,65219,65274,65294,65349,65389,65439,65554,65574,65604,65649,65669,65719,65748,65823,65843,65873,65883,65988,66038,66128,66163,66208,66228,66248,66248,66288,66298,66378,66428,66428,66458,66493,66523,66533,66588,66618,66653,66662,66682,66732,66817,66856,66866,66876,66896,66946,67006,67106,67166,67241,67321,67381,67401,67446,67516,67576,67640,67709,67739,67784,67804,67844,67854,67873,67893,67902,67932,67952,67992,68022,68022,68022,68022,68042,68107,68115,68210,68280,68300,68340,68358,68398,68448,68478,68508,68558,68588,68618,68673,68723,68763,68828,68838,68893,68943,69058,69108,69223,69258,69268,69303,69363,69393,69413,69458,69468,69523,69558,69693,69733,69743,69793,69843,69873,69883,69923,69952,70002,70012,70012,70032,70052,70127,70177,70237,70332,70382,70402,70437,70502,70542,70572,70622,70677,70677,70742,70772,70781,70791,70821,70851,70876,70896,70906,70936,70946,70976,70996,71006,71016,71066,71126,71191,71241,71261,71316,71326,71336,71396,71416,71436,71476,71531,71551,71590,71620,71675,71695,71745,71785,71825,71835,71885,71954,72037,72112,72112,72170,72235,72305,72325,72385,72425,72465,72520,72540,72560,72615,72660,72700,72710,72754,72764,72781,72850,72870,72935,72970,73070,73165,73225,73350,73360,73405,73445,73485,73505,73545,73585,73655,73695,73730,73780,73809,73834,73874,73904,73934,73964,73979,74009,74039,74079,74118,74153,74173,74248,74313,74363,74413,74423,74433,74443,74512,74541,74628,74728,74778,74798,74808,74828,74898,74938,74973,74983,75022,75052,75072,75162,75172,75201,75231,75309,75368,75388,75468,75618,75678,75703,75829,75866,75876,75936,75976,76006,76056,76161,76191,76201,76210,76220,76240,76295,76333,76343,76342,76370,76390,76400,76445,76465,76520,76545,76625,76655,76685,76695,76745,76755,76780,76840,76870,76930,76964,77024,77044,77054,77114,77124,77134,77183,77223,77298,77308,77348,77438,77467,77497,77582,77582,77622,77642,77672,77712,77741,77801,77811,77830,77870,77890,77925,77944,77989,78009,78059,78079,78099,78149,78169,78189,78234,78234,78274,78284,78354,78394,78454,78474,78494,78524,78564,78602,78647,78677,78702,78732,78762,78782,78811,78841,78881,78906,78906,78946,78964,78974,79004,79114,79144,79164,79184,79268,79342,79342,79362,79372,79410,79523,79608,79648,79678,79700,79720,79750,79795,79855,79875,79905,79955,79975,80020,80070,80110,80159,80199,80229,80289,80319,80349,80389,80409,80439,80469,80519,80604,80674,80704,80724,80734,80859,80889,80919,80959,81019,81094,81164,81174,81194,81224,81254,81304,81374,81394,81394,81414,81444,81474,81504,81564,81614,81649,81659,81699,81719,81729,81759,81799,81839,81849,81859,81949,81989,82038,82078,82143,82198,82238,82283,82333,82393,82422,82462,82482,82512,82617,82667,82757,82787,82817,82827,82892,82962,83000,83060,83100,83170,83190,83220,83260,83300,83370,83390,83410,83440,83460,83515,83560,83630,83660,83690,83700,83730,83785,83843,83903,83933,84008,84018,84018,84038,84048,84088,84183,84213,84223,84233]`),
},
},
{
"{key: true}",
[]json.RawMessage{
[]byte(`{"key":true}`),
},
},
{
"{true: 30}",
nil,
},
{
`let re = [/ab+c/];`,
[]json.RawMessage{
[]byte(`["/ab+c/"]`),
},
},
{
// Regex fields should be escaped as a normal string,
// no need to throw away useful data that we might want to extract
`{"key": /test/i, useful_data: { "a": "b" }, another_value_we_might_want:"c" }`,
[]json.RawMessage{
[]byte(`{"key":"/test/i","useful_data":{"a":"b"},"another_value_we_might_want":"c"}`),
},
},
{
`
[]
<script>
StackExchange.ready(function () {
var graphData = [984,984,1019,1019,1029,1029,1029,1029,1029,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1069,1069,1069,1069,1069,1069,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1134,1134,1134,1134,1134,1134,1144,1144,1144,1144,1144,1144,1144,1144,1154,1154,1154,1154,1154,1154,1154,1154,1164,1164,1189,1189,1199,1199,1199,1199,1199,1199,1199,1199,1199,1199,1199,1199,1199,1199,1214,1214,1214,1214,1214,1214,1229,1229,1229,1229,1229,1229,1229,1229,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1264,1264,1264,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1314,1314,1324,1324,1324,1324,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1344,1344,1344,1344,1344,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1364,1364,1364,1364,1364,1364,1364,1364,1364,1364,1364,1364,1374,1374,1374,1384,1384,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1404,1404,1404,1404,1404,1404,1404,1404,1404,1404,1414,1414,1414,1414,1424,1424,1424,1424,1424,1424];
StackExchange.user.renderMiniGraph(graphData);
StackExchange.user.userCardMessages.nextPrivInfo = [
'<h4 class="popup-title">Create new tags</h4>',
'<div class="popup-white">',
'<p>Add new tags to the site</p>',
'<div class="actions">',
'<span class="rep-number">1,424/1,500 Rep.</span>',
'<a href="/help/privileges/create-tags" class="s-btn s-btn__primary" title="Learn more">Learn more</a>',
'</div>',
'</div>'
].join('');
});
</script>`,
[]json.RawMessage{
[]byte(`[]`),
[]byte(`[984,984,1019,1019,1029,1029,1029,1029,1029,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1042,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1044,1069,1069,1069,1069,1069,1069,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1124,1134,1134,1134,1134,1134,1134,1144,1144,1144,1144,1144,1144,1144,1144,1154,1154,1154,1154,1154,1154,1154,1154,1164,1164,1189,1189,1199,1199,1199,1199,1199,1199,1199,1199,1199,1199,1199,1199,1199,1199,1214,1214,1214,1214,1214,1214,1229,1229,1229,1229,1229,1229,1229,1229,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1239,1264,1264,1264,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1289,1314,1314,1324,1324,1324,1324,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1334,1344,1344,1344,1344,1344,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1354,1364,1364,1364,1364,1364,1364,1364,1364,1364,1364,1364,1364,1374,1374,1374,1384,1384,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1394,1404,1404,1404,1404,1404,1404,1404,1404,1404,1404,1414,1414,1414,1414,1424,1424,1424,1424,1424,1424]`),
[]byte(`["<h4 class=\"popup-title\">Create new tags</h4>","<div class=\"popup-white\">","<p>Add new tags to the site</p>","<div class=\"actions\">","<span class=\"rep-number\">1,424/1,500 Rep.</span>","<a href=\"/help/privileges/create-tags\" class=\"s-btn s-btn__primary\" title=\"Learn more\">Learn more</a>","</div>","</div>"]`),
},
},
{`["<h4 class=\"popup-title\">Create new tags</h4>","<div class=\"popup-white\">","<p>Add new tags to the site</p>","<div class=\"actions\">","<span class=\"rep-number\">1,424/1,500 Rep.</span>","<a href=\"/help/privileges/create-tags\" class=\"s-btn s-btn__primary\" title=\"Learn more\">Learn more</a>","</div>","</div>"]`,
[]json.RawMessage{
[]byte(`["<h4 class=\"popup-title\">Create new tags</h4>","<div class=\"popup-white\">","<p>Add new tags to the site</p>","<div class=\"actions\">","<span class=\"rep-number\">1,424/1,500 Rep.</span>","<a href=\"/help/privileges/create-tags\" class=\"s-btn s-btn__primary\" title=\"Learn more\">Learn more</a>","</div>","</div>"]`),
},
},
{
`StackExchange.user.userCardMessages.nextPrivInfo = [
'<h4 class="popup-title">Create new tags</h4>',
'<div class="popup-white">',
'<p>Add new tags to the site</p>',
'<div class="actions">',
'<span class="rep-number">1,424/1,500 Rep.</span>',
'<a href="/help/privileges/create-tags" class="s-btn s-btn__primary" title="Learn more">Learn more</a>',
'</div>',
'</div>'
].join('');`,
[]json.RawMessage{
[]byte(`["<h4 class=\"popup-title\">Create new tags</h4>","<div class=\"popup-white\">","<p>Add new tags to the site</p>","<div class=\"actions\">","<span class=\"rep-number\">1,424/1,500 Rep.</span>","<a href=\"/help/privileges/create-tags\" class=\"s-btn s-btn__primary\" title=\"Learn more\">Learn more</a>","</div>","</div>"]`),
},
},
{
`[15, 17, -3]`,
[]json.RawMessage{
[]byte(`[15,17,-3]`),
},
},
{
// In JS, we can escape a ` in a template literal
"{ key: ` \\` ` }",
[]json.RawMessage{
[]byte("{\"key\":\" ` \"}"),
},
},
{
"[`Template quotes`]",
[]json.RawMessage{
[]byte("[\"Template quotes\"]"),
},
},
{
// The \n gets escaped by Go
"{ 'key': `this is a\nmultline JavaScript string` }",
[]json.RawMessage{
[]byte(`{"key":"this is a\nmultline JavaScript string"}`),
},
},
{
"[`Template quotes inside of template quotes can be escaped using \\``]",
[]json.RawMessage{
[]byte("[\"Template quotes inside of template quotes can be escaped using `\"]"),
},
},
{
"{ a: 'null', b: `true`, c: \"false\" }",
[]json.RawMessage{
[]byte(`{"a":"null","b":"true","c":"false"}`),
},
},
{
`{{ "test": "a" } {}text[] in {}between{}`,
[]json.RawMessage{
[]byte(`{"test":"a"}`),
[]byte(`{}`),
[]byte(`[]`),
[]byte(`{}`),
[]byte(`{}`),
},
},
{
`{{{{{ "test": "a" }} }}}}}}{ {}text[] in {}between{}`,
[]json.RawMessage{
[]byte(`{"test":"a"}`),
[]byte(`{}`),
[]byte(`[]`),
[]byte(`{}`),
[]byte(`{}`),
},
},
{
`{}some {}text[] in {}between{}`,
[]json.RawMessage{
[]byte(`{}`),
[]byte(`{}`),
[]byte(`[]`),
[]byte(`{}`),
[]byte(`{}`),
},
},
{
`{}{}[]{}{}`,
[]json.RawMessage{
[]byte(`{}`),
[]byte(`{}`),
[]byte(`[]`),
[]byte(`{}`),
[]byte(`{}`),
},
},
{
`{"a": "b"}`,
[]json.RawMessage{[]byte(`{"a":"b"}`)},
},
{
"[1, 3, 55]",
[]json.RawMessage{[]byte("[1,3,55]")},
},
{
"[1, 3, 55, ]",
[]json.RawMessage{
[]byte(`[1,3,55]`),
},
},
{
`{
"a": "b",
"c": "trailing comma",
}`,
[]json.RawMessage{
[]byte(`{"a":"b","c":"trailing comma"}`),
},
},
{
`{
"login": "xarantolus",
"id": 0,
"node_id": "----",
"avatar_url": "https://avatars.githubusercontent.com/u/----",
"gravatar_id": "",
"url": "https://api.github.com/users/xarantolus",
"html_url": "https://github.com/xarantolus",
"followers_url": "https://api.github.com/users/xarantolus/followers",
"following_url": "https://api.github.com/users/xarantolus/following{/other_user}",
"gists_url": "https://api.github.com/users/xarantolus/gists{/gist_id}",
"starred_url": "https://api.github.com/users/xarantolus/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/xarantolus/subscriptions",
"organizations_url": "https://api.github.com/users/xarantolus/orgs",
"repos_url": "https://api.github.com/users/xarantolus/repos",
"events_url": "https://api.github.com/users/xarantolus/events{/privacy}",
"received_events_url": "https://api.github.com/users/xarantolus/received_events",
"type": "User",
"site_admin": false,
"name": "----",
"company": null,
"blog": "----",
"location": "----",
"email": "----",
"hireable": "----",
"bio": "----",
"twitter_username": null,
"public_repos": 17,
"public_gists": 3,
"followers": 13,
"following": 242,
"created_at": "2017-10-02T18:47:02Z",
"updated_at": "2021-01-08T20:42:33Z"
}`,
[]json.RawMessage{[]byte(`{"login":"xarantolus","id":0,"node_id":"----","avatar_url":"https://avatars.githubusercontent.com/u/----","gravatar_id":"","url":"https://api.github.com/users/xarantolus","html_url":"https://github.com/xarantolus","followers_url":"https://api.github.com/users/xarantolus/followers","following_url":"https://api.github.com/users/xarantolus/following{/other_user}","gists_url":"https://api.github.com/users/xarantolus/gists{/gist_id}","starred_url":"https://api.github.com/users/xarantolus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xarantolus/subscriptions","organizations_url":"https://api.github.com/users/xarantolus/orgs","repos_url":"https://api.github.com/users/xarantolus/repos","events_url":"https://api.github.com/users/xarantolus/events{/privacy}","received_events_url":"https://api.github.com/users/xarantolus/received_events","type":"User","site_admin":false,"name":"----","company":null,"blog":"----","location":"----","email":"----","hireable":"----","bio":"----","twitter_username":null,"public_repos":17,"public_gists":3,"followers":13,"following":242,"created_at":"2017-10-02T18:47:02Z","updated_at":"2021-01-08T20:42:33Z"}`)},
},
{
"askdflaksmvalsd",
nil,
},
{
`"json encoded text\nNew line"`,
nil,
},
{
`{
"test": "this is a very }{} mean string"
}`,
[]json.RawMessage{
json.RawMessage([]byte(`{"test":"this is a very }{} mean string"}`)),
},
},
{
`{
"test": "this is another very ][] mean string"
}`,
[]json.RawMessage{
[]byte(
`{"test":"this is another very ][] mean string"}`),
},
},
{
`{}some {}text[] in {}between{}`,
[]json.RawMessage{
[]byte(`{}`),
[]byte(`{}`),
[]byte(`[]`),
[]byte(`{}`),
[]byte(`{}`),
},
},
{
`<script>
loadScript('/static/js/sidenav.js', {type: 'module', async: true, defer: true})
</script>`,
[]json.RawMessage{
[]byte(`{"type":"module","async":true,"defer":true}`),
},
},
{
`{'test': "Test"}`,
[]json.RawMessage{
[]byte(`{"test":"Test"}`),
},
},
{
`{
"a": null,
"b": true,
"c": false
}`,
[]json.RawMessage{
[]byte(`{"a":null,"b":true,"c":false}`),
},
},
{
`["one", 'two', "three", ]`,
[]json.RawMessage{
[]byte(`["one","two","three"]`),
},
},
{
`{
// Keys without quotes are valid in JavaScript, but not in JSON
key: "value",
num: 295.2,
// Comments are removed while processing
// Mixing normal and quotes keys is possible
"obj": {
"quoted": 325,
unquoted: 'test', // This trailing comma will be removed
}
}`,
[]json.RawMessage{
[]byte(`{"key":"value","num":295.2,"obj":{"quoted":325,"unquoted":"test"}}`),
},
},
{
`<script>var arr = ["one", 'two & three', "four", ];</script>`,
[]json.RawMessage{
[]byte(`["one","two & three","four"]`),
},
},
{
`{"num": 3+3 }`,
nil,
},
{
`{expr: null || "fallback string" }`,
nil,
},
{
strings.Repeat("{", 250) + strings.Repeat("}", 100),
[]json.RawMessage{
[]byte("{}"),
},
},
{
strings.Repeat("[", 100) + "]",
[]json.RawMessage{
[]byte("[]"),
},
},
{
"[\"" + strings.Repeat("long string ", 100) + "]",
nil,
},
{
`{"test": 0x3}`,
[]json.RawMessage{
[]byte(`{"test":3}`),
},
},
{
`{"value":25,"another":"test","quoted":{"is this even valid in JS?":75},"nextkey":"this\ntemplate literal\n\nspans\n\nmany \n\n\nlines"}`,
nil,
},
{
`{"subkey":"value"}`,
nil,
},
{
`{"subkey":"value"}`,
nil,
},
{
`{"@context":"https://schema.org","@type":"Product","aggregateRating":{"@type":"AggregateRating","ratingValue":"3.5","reviewCount":"11"},"description":"jsonextract is a Go library","name":"jsonextract","image":"microwave.jpg","offers":{"@type":"Offer","availability":"https://schema.org/InStock","price":"00.00","priceCurrency":"USD"},"review":[{"@type":"Review","author":"Ellie","datePublished":"2012-09-06","reviewBody":"I'm still not sure if this works.","name":"Test","reviewRating":{"@type":"Rating","bestRating":"5","ratingValue":"1","worstRating":"1"}},{"@type":"Review","author":"Lucas","datePublished":"2014-02-21","reviewBody":"Great microwave for the price.","name":"Value purchase","reviewRating":{"@type":"Rating","bestRating":"5","ratingValue":"4","worstRating":"1"}}]}`,
nil,
},
{
`{}`,
nil,
},
{
`[]`,
nil,
},
{
"[\" this is a template string. \",\"in JS you can escape` the quote character `\"]",
nil,
},
}