提交 01624fea 编写于 作者: G Ganlin Zhao

[TD-10532]<enhance>: schemaless fix inserting one datapoint error in JSON Array

上级 f44f1d2f
...@@ -1003,7 +1003,7 @@ static int32_t tscParseMultiJSONPayload(char* payload, SArray* points, SSmlLines ...@@ -1003,7 +1003,7 @@ static int32_t tscParseMultiJSONPayload(char* payload, SArray* points, SSmlLines
for (int32_t i = 0; i < payloadNum; ++i) { for (int32_t i = 0; i < payloadNum; ++i) {
TAOS_SML_DATA_POINT point = {0}; TAOS_SML_DATA_POINT point = {0};
cJSON *dataPoint = (payloadNum == 1) ? root : cJSON_GetArrayItem(root, i); cJSON *dataPoint = (payloadNum == 1 && cJSON_IsObject(root)) ? root : cJSON_GetArrayItem(root, i);
ret = tscParseJSONPayload(dataPoint, &point, info); ret = tscParseJSONPayload(dataPoint, &point, info);
if (ret != TSDB_CODE_SUCCESS) { if (ret != TSDB_CODE_SUCCESS) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册