From 071ee9772f1c481b62ed9469a5f2dad0cf865cab Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Fri, 30 Dec 2022 18:14:18 +0800 Subject: [PATCH] fix:json parse error --- source/client/src/clientSmlJson.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/client/src/clientSmlJson.c b/source/client/src/clientSmlJson.c index 31b0ed455b..c4cd558418 100644 --- a/source/client/src/clientSmlJson.c +++ b/source/client/src/clientSmlJson.c @@ -1040,6 +1040,8 @@ static int32_t smlParseJSONExt(SSmlHandle *info, char *payload) { if(ret != TSDB_CODE_SUCCESS){ return ret; } + + info->parseJsonByLib = true; cJSON *head = (payloadNum == 1 && cJSON_IsObject(info->root)) ? info->root : info->root->child; int cnt = 0; @@ -1173,7 +1175,6 @@ int32_t smlParseJSON(SSmlHandle *info, char *payload) { } if (unlikely(ret != TSDB_CODE_SUCCESS)) { uError("SML:0x%" PRIx64 " Invalid JSON Payload 1:%s", info->id, payload); - info->parseJsonByLib = true; return smlParseJSONExt(info, payload); } -- GitLab