|
|
@ -54,6 +54,12 @@ int test_object(void) {
|
|
|
|
check(parse("{\"a\": {2}}", JSMN_ERROR_INVAL, 3));
|
|
|
|
check(parse("{\"a\": {2}}", JSMN_ERROR_INVAL, 3));
|
|
|
|
check(parse("{\"a\": {2: 3}}", JSMN_ERROR_INVAL, 3));
|
|
|
|
check(parse("{\"a\": {2: 3}}", JSMN_ERROR_INVAL, 3));
|
|
|
|
check(parse("{\"a\": {\"a\": 2 3}}", JSMN_ERROR_INVAL, 5));
|
|
|
|
check(parse("{\"a\": {\"a\": 2 3}}", JSMN_ERROR_INVAL, 5));
|
|
|
|
|
|
|
|
check(parse("{\"a\"}", JSMN_ERROR_INVAL, 2));
|
|
|
|
|
|
|
|
check(parse("{\"a\": 1, \"b\"}", JSMN_ERROR_INVAL, 4));
|
|
|
|
|
|
|
|
check(parse("{\"a\",\"b\":1}", JSMN_ERROR_INVAL, 4));
|
|
|
|
|
|
|
|
check(parse("{\"a\":1,}", JSMN_ERROR_INVAL, 4));
|
|
|
|
|
|
|
|
check(parse("{\"a\":\"b\":\"c\"}", JSMN_ERROR_INVAL, 4));
|
|
|
|
|
|
|
|
check(parse("{,}", JSMN_ERROR_INVAL, 4));
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|