parser json BUGFIX proper skip of invalid data
diff --git a/src/parser_json.c b/src/parser_json.c
index 0c262c6..6f25ebb 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -1558,6 +1558,8 @@
             if ((r = lydjson_data_skip(lydctx->jsonctx))) {
                 rc = r;
             }
+            r = lyjson_ctx_next(lydctx->jsonctx, &status);
+            LY_CHECK_ERR_GOTO(r, rc = r, cleanup);
             goto cleanup;
         } else if (r) {
             /* error */