Skip to content

Commit ba293de

Browse files
committed
Fixes #10: invalid json input files.
1 parent f295aa9 commit ba293de

File tree

2 files changed

+107
-90
lines changed

2 files changed

+107
-90
lines changed

files/test1.json

Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,40 @@
1-
{
2-
3-
"version": {
4-
"major": 2,
5-
"minor": 2,
6-
"patch": 1,
7-
"string": "2.2.1",
8-
"svn": 7191
9-
},
10-
"files": [
11-
"..\\path\\to\\files\\file1.txt",
12-
"..\\path\\to\\files\\file2.txt",
13-
"..\\path\\to\\files\\file3.txt",
14-
"test \uXXXX \uABCD \uABCD\uABCDtest",
15-
" test test test"
16-
],
17-
18-
"empty_array": [
19-
],
20-
21-
"empty_object":{
22-
23-
},
24-
25-
"empty_string": "",
26-
27-
"data": [
28-
{
29-
"number": 1,
30-
"tf1": true,
31-
"tf2": false,
32-
"name": "Horatio",
33-
"array": ["1","2","3"]
34-
},
35-
{
36-
"number": 2,
37-
"integer": 33,
38-
"real": 2.333e2,
39-
"name": "Nelson"
40-
}
41-
]
42-
43-
}
1+
{
2+
"version": {
3+
"major": 2,
4+
"minor": 2,
5+
"patch": 1,
6+
"string": "2.2.1",
7+
"svn": 7191
8+
},
9+
"files": [
10+
"..\\path\\to\\files\\file1.txt",
11+
"..\\path\\to\\files\\file2.txt",
12+
"..\\path\\to\\files\\file3.txt",
13+
"test \u2FA4 \uABCD \uABCD\uABCDtest",
14+
" test test test"
15+
],
16+
"empty_array": [
17+
],
18+
"empty_object": {
19+
},
20+
"empty_string": "",
21+
"data": [
22+
{
23+
"number": 1,
24+
"tf1": true,
25+
"tf2": false,
26+
"name": "Horatio",
27+
"array": [
28+
"1",
29+
"2",
30+
"3"
31+
]
32+
},
33+
{
34+
"number": 2,
35+
"integer": 33,
36+
"real": 0.2333000000000000E+003,
37+
"name": "Nelson"
38+
}
39+
]
40+
}

files/test5.json

Lines changed: 67 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,82 @@
11
{
2-
"Prior" :
3-
[
2+
"Prior": [
43
{
5-
"ID" : [1,3] ,
6-
"type" : "cyclic" ,
7-
"period" : 180
4+
"ID": [
5+
1,
6+
3
7+
],
8+
"type": "cyclic",
9+
"period": 180
810
},
911
{
10-
"ID" : [3,4] ,
11-
"type" : "uniform",
12-
"LowBound" : 0,
13-
"HighBound" : 1
12+
"ID": [
13+
3,
14+
4
15+
],
16+
"type": "uniform",
17+
"LowBound": 0,
18+
"HighBound": 1
1419
},
1520
{
16-
"ID" : [3,1] ,
17-
"type" : "Normal" ,
18-
"mode" : 0.3 ,
19-
"width" : 40. ,
20-
"LowBound" : null ,
21-
"HighBound" : null
21+
"ID": [
22+
3,
23+
1
24+
],
25+
"type": "Normal",
26+
"mode": 0.3000000000000000E+000,
27+
"width": 0.4000000000000000E+002,
28+
"LowBound": null,
29+
"HighBound": null
2230
},
2331
{
24-
"ID" : [3,3] ,
25-
"type" : "LogNormal",
26-
"mode" : 100. ,
27-
"width" : 0.2,
28-
"LowBound" : null,
29-
"HighBound" : null
32+
"ID": [
33+
3,
34+
3
35+
],
36+
"type": "LogNormal",
37+
"mode": 0.1000000000000000E+003,
38+
"width": 0.2000000000000000E+000,
39+
"LowBound": null,
40+
"HighBound": null
3041
},
3142
{
32-
"ID" : [2,2] ,
33-
"type" : "ImgPos2",
34-
"x" : 0.4 ,
35-
"y" : 0.5 ,
36-
"a" : 0.3 ,
37-
"b" : 0.2 ,
38-
"theta" : 40
43+
"ID": [
44+
2,
45+
2
46+
],
47+
"type": "ImgPos2",
48+
"x": 0.4000000000000000E+000,
49+
"y": 0.5000000000000000E+000,
50+
"a": 0.3000000000000000E+000,
51+
"b": 0.2000000000000000E+000,
52+
"theta": 40
3953
},
4054
{
41-
"ID" : [1,1] ,
42-
"type" : "SrcPos1",
43-
"x" : 0.4,
44-
"y" : 0.5,
45-
"a" : 0.4
55+
"ID": [
56+
1,
57+
1
58+
],
59+
"type": "SrcPos1",
60+
"x": 0.4000000000000000E+000,
61+
"y": 0.5000000000000000E+000,
62+
"a": 0.4000000000000000E+000
4663
},
4764
{
48-
"ID" : [1,4] ,
49-
"type" : "Ellip2" ,
50-
"width" : 0.3 ,
51-
"highBound" : 1.0
65+
"ID": [
66+
1,
67+
4
68+
],
69+
"type": "Ellip2",
70+
"width": 0.3000000000000000E+000,
71+
"highBound": 0.1000000000000000E+001
5272
}
53-
]
54-
,
55-
"Correl" :
56-
{
57-
"ID1" : [1,2] ,
58-
"ID2" : 3 ,
59-
"correl" : 0.99,
60-
}
61-
62-
}
73+
],
74+
"Correl": {
75+
"ID1": [
76+
1,
77+
2
78+
],
79+
"ID2": 3,
80+
"correl": 0.9900000000000000E+000
81+
}
82+
}

0 commit comments

Comments
 (0)