From 877266cde0ed2f6f3359c5e5ca5b3ad2a6fe2b9b Mon Sep 17 00:00:00 2001 From: wangmm0220 Date: Thu, 16 Sep 2021 17:46:07 +0800 Subject: [PATCH] TD-6129 add json tag support --- src/client/src/tscSQLParser.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 0edc7f03f4..a2e8947de1 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -1477,39 +1477,6 @@ static bool validateTableColumnInfo(SArray* pFieldList, SSqlCmd* pCmd) { return true; } -static bool validataTagJson(char *json){ - const char* msg1 = "json parse error"; - cJSON *root = cJSON_Parse(json); - if (root == NULL){ - tscError("json parse error : %s", json); - return false; - } - - bool returnVal = true; - int size = cJSON_GetArraySize(root); - if(!cJSON_IsObject(root) || size == 0){ - tscError("json error invalide value"); - } - for(int i = 0; i < size; i++) { - cJSON* item = cJSON_GetArrayItem(root, i); - if (!item) { - tscError("json inner error:%d", i); - returnVal = false; - goto end; - } - if(item->type != cJSON_String && item->type != cJSON_Number){ - tscError("json value unsupport:%d", item->type); - returnVal = false; - goto end; - } - } - -end: - cJSON_Delete(root); - return returnVal; -} - - static bool validateTagParams(SArray* pTagsList, SArray* pFieldList, SSqlCmd* pCmd) { assert(pTagsList != NULL); -- GitLab