From 9b45f89af7fd54066ce47e8f9cd8bb12a9deddde Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Sun, 30 Jan 2022 17:21:02 +0800 Subject: [PATCH] [TD-13348]fix json parse error --- src/client/src/tscUtil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 1fd5806c79..771592480b 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -5390,7 +5390,7 @@ int parseJsontoTagData(char* json, SKVRowBuilder* kvRowBuilder, char* errMsg, in varDataSetLen(nullTypeVal + CHAR_BYTES, INT_BYTES); *(uint32_t*)(varDataVal(nullTypeKey)) = jsonNULL; tdAddColToKVRow(kvRowBuilder, jsonIndex++, TSDB_DATA_TYPE_NCHAR, nullTypeKey, false); // add json null type - if (!json || strtrim(json) == 0 || strcasecmp(json, "null") == 0){ + if (!json || strtrim(json) == 0 || strncasecmp(json, "null", 4) == 0){ *(uint32_t*)(varDataVal(nullTypeVal + CHAR_BYTES)) = jsonNULL; tdAddColToKVRow(kvRowBuilder, jsonIndex++, TSDB_DATA_TYPE_NCHAR, nullTypeVal, true); // add json null value return TSDB_CODE_SUCCESS; -- GitLab