From aeafb49673740fb4260cfae467eb5cd8d4d783be Mon Sep 17 00:00:00 2001 From: xiao-77 Date: Tue, 5 Nov 2024 10:04:36 +0800 Subject: [PATCH] modify local.json format --- source/common/src/tglobal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/common/src/tglobal.c b/source/common/src/tglobal.c index a0cff8dafc..7bf3cbe8d5 100644 --- a/source/common/src/tglobal.c +++ b/source/common/src/tglobal.c @@ -2526,7 +2526,7 @@ int32_t localConfigSerialize(SArray *array, char **serialized) { int sz = taosArrayGetSize(array); - cJSON *cField = cJSON_CreateArray(); + cJSON *cField = cJSON_CreateObject(); if (array == NULL) { cJSON_Delete(json); TAOS_RETURN(TSDB_CODE_OUT_OF_MEMORY); @@ -2564,7 +2564,7 @@ int32_t localConfigSerialize(SArray *array, char **serialized) { } } } - cJSON_AddItemToObject(json, "pArray", cField); + cJSON_AddItemToObject(json, "configs", cField); *serialized = cJSON_Print(json); cJSON_Delete(json); return TSDB_CODE_SUCCESS;