fix: multi-module JSON has top array

master
Sean McBride 4 years ago
parent 574dd81791
commit bf5f31adad

@ -1,3 +1,4 @@
[
{
"name": "ekf_first_iter",
"path": "ekf_wasm.so",
@ -28,3 +29,4 @@
"http-resp-size": 1024000,
"http-resp-content-type": "application/octet-stream"
}
]

@ -1,3 +1,4 @@
[
{
"name": "cifar10_rand",
"path": "cifar10_wasm.so",
@ -18,3 +19,4 @@
"http-resp-size": 128,
"http-resp-content-type": "text/plain"
}
]

@ -1,3 +1,4 @@
[
{
"name": "resize_small",
"path": "resize_wasm.so",
@ -28,3 +29,4 @@
"http-resp-size": 1524000,
"http-resp-content-type": "image/png"
}
]

@ -1,3 +1,4 @@
[
{
"name": "lpd1",
"path": "lpd_wasm.so",
@ -28,3 +29,4 @@
"http-resp-size": 1048576,
"http-resp-content-type": "text/plain"
}
]

@ -1,3 +1,4 @@
[
{
"name": "gocr_72_dpi",
"path": "gocr_wasm.so",
@ -28,3 +29,4 @@
"http-resp-size": 5335057,
"http-resp-content-type": "text/plain"
}
]

@ -1,3 +1,4 @@
[
{
"name": "gocr_mono",
"path": "gocr_wasm.so",
@ -28,3 +29,4 @@
"http-resp-size": 5335057,
"http-resp-content-type": "text/plain"
}
]

@ -1,3 +1,4 @@
[
{
"name": "gocr_1_word",
"path": "gocr_wasm.so",
@ -28,3 +29,4 @@
"http-resp-size": 5335057,
"http-resp-content-type": "text/plain"
}
]

@ -1,3 +1,4 @@
[
{
"name": "fibonacci_10",
"path": "fibonacci_wasm.so",
@ -20,3 +21,4 @@
"http-resp-size": 1024,
"http-resp-content-type": "text/plain"
}
]

@ -1,3 +1,4 @@
[
{
"name": "ekf",
"path": "ekf_wasm.so",
@ -48,3 +49,4 @@
"http-resp-size": 128,
"http-resp-content-type": "text/plain"
}
]

@ -1,3 +1,4 @@
[
{
"name": "work1k",
"path": "work1k_wasm.so",
@ -38,3 +39,4 @@
"http-resp-size": 1048776,
"http-resp-content-type": "text/plain"
}
]

@ -1,3 +1,4 @@
[
{
"name": "fibonacci_10",
"path": "fibonacci_wasm.so",
@ -20,3 +21,4 @@
"http-resp-size": 1024,
"http-resp-content-type": "text/plain"
}
]

@ -1,3 +1,4 @@
[
{
"name": "cifar10_1.5",
"path": "cifar10_wasm.so",
@ -328,3 +329,4 @@
"http-resp-content-type": "image/png",
"admissions-percentile": 90
}
]

@ -305,6 +305,8 @@ module_new_from_json(char *file_name)
int module_count = 0;
for (int i = 0; i < total_tokens; i++) {
/* If we have multiple objects, they should be wrapped in a JSON array */
if (tokens[i].type == JSMN_ARRAY) continue;
assert(tokens[i].type == JSMN_OBJECT);
char module_name[MODULE_MAX_NAME_LENGTH] = { 0 };

Loading…
Cancel
Save