提交 859e4719 编写于 作者: G Ganlin Zhao

[TD-6443]<feature>: Support OpenTSDB HTTP JSON data import format

上级 4bd405f6
......@@ -526,9 +526,9 @@ int32_t parseMetricValueFromJSON(cJSON *root, TAOS_SML_KV **pKVs, int *num_kvs,
case cJSON_String: {
//convert default JSON String type to nchar
pVal->type = TSDB_DATA_TYPE_NCHAR;
pVal->length = wcslen((wchar_t *)metricVal->string) * TSDB_NCHAR_SIZE;
pVal->length = wcslen((wchar_t *)metricVal->valuestring) * TSDB_NCHAR_SIZE;
pVal->value = tcalloc(pVal->length + 1, 1);
memcpy(pVal->value, metricVal->string, pVal->length);
memcpy(pVal->value, metricVal->valuestring, pVal->length);
break;
}
default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册