json parser BUGFIX processing "{}" is not correctly handled
@@ -1422,8 +1422,8 @@ lyd_parse_json_data(const struct ly_ctx *ctx, struct ly_in *in, uint32_t parse_o
LY_CHECK_GOTO(ret, cleanup);
status = lyjson_ctx_status(lydctx->jsonctx, 0);
- LY_CHECK_GOTO(status == LYJSON_END, cleanup);
- assert(status == LYJSON_OBJECT);
+ LY_CHECK_GOTO(status == LYJSON_END || status == LYJSON_OBJECT_EMPTY, cleanup);
+ assert((status == LYJSON_OBJECT));
/* read subtree(s) */
while (lydctx->jsonctx->in->current[0] && status != LYJSON_OBJECT_CLOSED) {
