const char* j3 = "{\"a\":[],\"ab\":[{\"c1\":1,\"c2\":2},{\"c1\":3,\"c2\":4}]}";
ASSERT(mjson_find(j3, strlen(j3), "$.a[0]", &p, &n) == MJSON_TOK_INVALID); // this line FAIL!
printf("mjson got: %d\n", mjson_find(j3, strlen(j3), "$.a[0]", &p, &n));
printf("got: %.*s\n", n, p);
output:
mjson got 123
got: {"c1":1,"c2":2}