Proper handling {} in JSON array + unit test

This commit is contained in:
cpq committed 2023-06-06 08:38:08 +01:00
1 parent fe0d2272f6
commit 6085998d57
3 files changed
+6

No files matched your search

+1
View File
@@ -182,6 +182,7 @@ int mg_json_get(struct mg_str json, const char *path, int *toklen) {
} else if (c == '}') { // Empty object
MG_EOO('}');
expecting = S_COMMA_OR_EOO;
if (depth == ed && ei >= 0) ci++;
} else {
return MG_JSON_INVALID;
}