-
Notifications
You must be signed in to change notification settings - Fork 1
JSON data format
toolleeo edited this page Oct 9, 2016
·
3 revisions
A snippet of the current JSON output:
{
"Test number 2." : {
"error_message" : null,
"sections" : {
"SECT C" : {
"section status" : "ok",
"code" : 2,
"expected" : [
"This line is 10% correct.\n"
],
"similarity" : 80,
"generated" : [
"This line is 100% correct."
],
"wrong lines" : [
[
0,
"This line is 100% correct.",
"This line is 10% correct."
]
]
},
"SECT B" : {
"similarity" : 60,
"generated" : [
"0",
"0",
"0",
"0",
"0"
],
"wrong lines" : [
[
2,
"0",
"1"
],
[
3,
"0",
"1"
]
],
"section status" : "ok",
"code" : 2,
"expected" : [
"0\n",
"0\n",
"1\n",
"1\n",
"0\n"
]
},
"SECT A" : {
"generated" : [
"A 0",
"B 0"
],
"wrong lines" : [
[
0,
"A 0",
"A 1"
]
],
"similarity" : 75,
"expected" : [
"A 1\n",
"B 0\n"
],
"code" : 2,
"section status" : "ok"
},
"SECT D" : {
"extra" : [],
"section status" : "missing"
}
},
"summary" : {
"SECT B" : 2,
"SECT C" : 2,
"SECT A" : 2,
"SECT D" : 1,
"<program>" : 2
},
"file_text" : "Input line 11\nInput line 12\nInput line 13\n",
"input_text" : null,
"input_file_name" : "/tmp/tmpxql8025c.pvcheck.tmp",
"order" : 2,
"output" : [
"[SECT A]",
"A 0",
"B 0",
"",
"[SECT B]",
"0",
"0",
"0",
"0",
"0",
"",
"[SECT C]",
"This line is 100% correct.",
"",
""
]
},
"Test number 1." : {
"error_message" : null,
"sections" : {
"SECT D" : {
"section status" : "missing",
"extra" : []
},
"SECT C" : {
"generated" : [
"This line is 100% correct."
],
"wrong lines" : [],
"similarity" : 100,
"code" : 0,
"section status" : "ok",
"expected" : [
"This line is 100% correct.\n"
]
},
"SECT B" : {
"section status" : "ok",
"code" : 0,
"expected" : [
"0\n",
"0\n",
"0\n",
"0\n",
"0\n"
],
"similarity" : 100,
"wrong lines" : [],
"generated" : [
"0",
"0",
"0",
"0",
"0"
]
},
"SECT A" : {
"expected" : [
"A 0\n",
"B 0\n"
],
"code" : 0,
"section status" : "ok",
"wrong lines" : [],
"generated" : [
"A 0",
"B 0"
],
"similarity" : 100
}
},
"file_text" : "Input line 1\nInput line 2\nInput line 3\n",
"input_text" : null,
"summary" : {
"SECT A" : 0,
"SECT C" : 0,
"SECT B" : 0,
"SECT D" : 1,
"<program>" : 1
},
"input_file_name" : "/tmp/tmpzk0wxrbb.pvcheck.tmp",
"output" : [
"[SECT A]",
"A 0",
"B 0",
"",
"[SECT B]",
"0",
"0",
"0",
"0",
"0",
"",
"[SECT C]",
"This line is 100% correct.",
"",
""
],
"order" : 1
},
"Example of use of external file" : {
"output" : [
"[SECT A]",
"A 0",
"B 0",
"",
"[SECT B]",
"0",
"0",
"0",
"0",
"0",
"",
"[SECT C]",
"This line is 100% correct.",
"",
""
],
"order" : 0,
"input_file_name" : "external.dat",
"error_message" : null,
"sections" : {
"SECT A" : {
"expected" : [
"A 0\n",
"B 0\n"
],
"code" : 0,
"section status" : "ok",
"generated" : [
"A 0",
"B 0"
],
"wrong lines" : [],
"similarity" : 100
},
"SECT B" : {
"code" : 2,
"extra" : [
"SECT C"
],
"section status" : "ok",
"expected" : [
"0\n",
"0\n",
"0\n"
],
"generated" : [
"0",
"0",
"0",
"0",
"0"
],
"wrong lines" : [],
"similarity" : 80
}
},
"file_text" : null,
"summary" : {
"SECT B" : 2,
"SECT A" : 0,
"<program>" : 2
},
"input_text" : null
}
}
Some comments:
- the
summary
section should not be contained in the JSON, but computed on the basis of some values contained in the JSON itself - some text includes the
'\n'
, some do not