• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

taosdata / TDengine / #5056

17 May 2026 01:15AM UTC coverage: 73.384% (+0.03%) from 73.355%
#5056

push

travis-ci

web-flow
feat (TDgpt): Dynamic Model Synchronization Enhancements (#35344)

* refactor: do some internal refactor.

* fix: fix multiprocess sync issue.

* feat: add dynamic anomaly detection and forecasting services

* fix: log error message for undeploying model in exception handling

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* fix: handle undeploy when model exists only on disk

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/286aafa0-c3ce-4c27-b803-2707571e9dc1

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: guard dynamic registry concurrent access

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/5e4db858-6458-40f4-ac28-d1b1b7f97c18

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: tighten service list locking scope

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/5e4db858-6458-40f4-ac28-d1b1b7f97c18

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: restore prophet support and update tests per review feedback

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/92298ae1-7da6-4d07-b20e-101c7cd0b26b

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* fix: improve test name and move copy inside lock scope

Agent-Logs-Url: https://github.com/taosdata/TDengine/sessions/92298ae1-7da6-4d07-b20e-101c7cd0b26b

Co-authored-by: hjxilinx <8252296+hjxilinx@users.noreply.github.com>

* Potential fix for pull request finding

Co-au... (continued)

281643 of 383795 relevant lines covered (73.38%)

135942701.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.72
/source/util/src/tjson.c
1
/*
2
 * Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
3
 *
4
 * This program is free software: you can use, redistribute, and/or modify
5
 * it under the terms of the GNU Affero General Public License, version 3
6
 * or later ("AGPL"), as published by the Free Software Foundation.
7
 *
8
 * This program is distributed in the hope that it will be useful, but WITHOUT
9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
 * FITNESS FOR A PARTICULAR PURPOSE.
11
 *
12
 * You should have received a copy of the GNU Affero General Public License
13
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
14
 */
15

16
#define _DEFAULT_SOURCE
17

18
#include "tjson.h"
19
#include "cJSON.h"
20
#include "taoserror.h"
21

22
SJson* tjsonCreateObject() {
2,147,483,647✔
23
  SJson* pJson = cJSON_CreateObject();
2,147,483,647✔
24
  if (pJson == NULL) {
2,147,483,647✔
25
    terrno = TSDB_CODE_OUT_OF_MEMORY;
×
26
  }
27
  return pJson;
2,147,483,647✔
28
}
29

30
SJson* tjsonCreateArray() {
44,107,119✔
31
  SJson* pJson = cJSON_CreateArray();
44,107,119✔
32
  if (pJson == NULL) {
44,114,787✔
33
    terrno = TSDB_CODE_OUT_OF_MEMORY;
×
34
  }
35
  return pJson;
44,109,651✔
36
}
37

38
void tjsonDelete(SJson* pJson) {
756,762,578✔
39
  if (pJson != NULL) {
756,762,578✔
40
    cJSON_Delete((cJSON*)pJson);
756,763,720✔
41
  }
42
}
756,759,081✔
43

44
int32_t tjsonAddIntegerToObject(SJson* pJson, const char* pName, const uint64_t number) {
2,147,483,647✔
45
  char tmp[40] = {0};
2,147,483,647✔
46
  snprintf(tmp, sizeof(tmp), "%" PRId64, number);
2,147,483,647✔
47
  return tjsonAddStringToObject(pJson, pName, tmp);
2,147,483,647✔
48
}
49

50
int32_t tjsonAddDoubleToObject(SJson* pJson, const char* pName, const double number) {
511,593,323✔
51
  if (NULL == cJSON_AddNumberToObject((cJSON*)pJson, pName, number)) {
511,593,323✔
52
    return terrno = TSDB_CODE_OUT_OF_MEMORY;
2,869✔
53
  }
54

55
  return TSDB_CODE_SUCCESS;
511,593,962✔
56
}
57

58
int32_t tjsonAddBoolToObject(SJson* pJson, const char* pName, const bool boolean) {
2,147,483,647✔
59
  if (NULL == cJSON_AddBoolToObject((cJSON*)pJson, pName, boolean)) {
2,147,483,647✔
60
    return terrno = TSDB_CODE_OUT_OF_MEMORY;
1,842✔
61
  }
62

63
  return TSDB_CODE_SUCCESS;
2,147,483,647✔
64
}
65

66
int32_t tjsonAddStringToObject(SJson* pJson, const char* pName, const char* pVal) {
2,147,483,647✔
67
  if (NULL == cJSON_AddStringToObject((cJSON*)pJson, pName, pVal)) {
2,147,483,647✔
68
    return terrno = TSDB_CODE_OUT_OF_MEMORY;
×
69
  }
70

71
  return TSDB_CODE_SUCCESS;
2,147,483,647✔
72
}
73

74
SJson* tjsonAddArrayToObject(SJson* pJson, const char* pName) {
2,147,483,647✔
75
  SJson* ret = (SJson*)cJSON_AddArrayToObject((cJSON*)pJson, pName);
2,147,483,647✔
76
  if (ret == NULL) {
2,147,483,647✔
77
    terrno = TSDB_CODE_OUT_OF_MEMORY;
×
78
  }
79
  return ret;
2,147,483,647✔
80
}
81

82
int32_t tjsonAddItemToObject(SJson* pJson, const char* pName, SJson* pItem) {
2,147,483,647✔
83
  if (cJSON_AddItemToObject((cJSON*)pJson, pName, pItem)) {
2,147,483,647✔
84
    return TSDB_CODE_SUCCESS;
2,147,483,647✔
85
  }
86

87
  return terrno = TSDB_CODE_OUT_OF_MEMORY;
15✔
88
}
89

90
int32_t tjsonAddItemToArray(SJson* pJson, SJson* pItem) {
2,147,483,647✔
91
  if (cJSON_AddItemToArray((cJSON*)pJson, pItem)) {
2,147,483,647✔
92
    return TSDB_CODE_SUCCESS;
2,147,483,647✔
93
  }
94

95
  return terrno = TSDB_CODE_OUT_OF_MEMORY;
×
96
}
97

98
int32_t tjsonAddObject(SJson* pJson, const char* pName, FToJson func, const void* pObj) {
2,147,483,647✔
99
  if (NULL == pObj) {
2,147,483,647✔
100
    return TSDB_CODE_SUCCESS;
2,147,483,647✔
101
  }
102

103
  SJson* pJobj = tjsonCreateObject();
2,147,483,647✔
104
  if (NULL == pJobj) {
2,147,483,647✔
105
    return terrno;
×
106
  }
107
  int32_t rc = func(pObj, pJobj);
2,147,483,647✔
108
  if (rc != TSDB_CODE_SUCCESS) {
2,147,483,647✔
109
    tjsonDelete(pJobj);
×
110
    return rc;
×
111
  }
112
  return tjsonAddItemToObject(pJson, pName, pJobj);
2,147,483,647✔
113
}
114

115
int32_t tjsonAddItem(SJson* pJson, FToJson func, const void* pObj) {
2,147,483,647✔
116
  SJson* pJobj = tjsonCreateObject();
2,147,483,647✔
117
  if (pJobj == NULL) {
2,147,483,647✔
118
    return terrno;
×
119
  }
120

121
  int32_t rc = func(pObj, pJobj);
2,147,483,647✔
122
  if (rc != TSDB_CODE_SUCCESS) {
2,147,483,647✔
123
    tjsonDelete(pJobj);
×
124
    return rc;
×
125
  }
126
  return tjsonAddItemToArray(pJson, pJobj);
2,147,483,647✔
127
}
128

129
int32_t tjsonAddArray(SJson* pJson, const char* pName, FToJson func, const void* pArray, int32_t itemSize,
1,027,174,222✔
130
                      int32_t num) {
131
  if (num > 0) {
1,027,174,222✔
132
    SJson* pJsonArray = tjsonAddArrayToObject(pJson, pName);
946,564,133✔
133
    if (NULL == pJsonArray) {
946,559,784✔
134
      return terrno;
343✔
135
    }
136
    for (size_t i = 0; i < num; ++i) {
1,987,202,831✔
137
      int32_t code = tjsonAddItem(pJsonArray, func, (const char*)pArray + itemSize * i);
1,040,645,739✔
138
      if (TSDB_CODE_SUCCESS != code) {
1,040,642,409✔
139
        return code;
×
140
      }
141
    }
142
  }
143
  return TSDB_CODE_SUCCESS;
1,027,167,181✔
144
}
145

146
int32_t tjsonAddTArray(SJson* pJson, const char* pName, FToJson func, const SArray* pArray) {
3,400,492✔
147
  int32_t num = taosArrayGetSize(pArray);
3,400,492✔
148
  if (num > 0) {
3,400,492✔
149
    SJson* pJsonArray = tjsonAddArrayToObject(pJson, pName);
1,630,324✔
150
    if (NULL == pJsonArray) {
1,630,324✔
151
      return terrno;
×
152
    }
153
    for (int32_t i = 0; i < num; ++i) {
3,999,958✔
154
      int32_t code = tjsonAddItem(pJsonArray, func, taosArrayGet(pArray, i));
2,369,634✔
155
      if (TSDB_CODE_SUCCESS != code) {
2,369,634✔
156
        return code;
×
157
      }
158
    }
159
  }
160
  return TSDB_CODE_SUCCESS;
3,400,492✔
161
}
162

163
char* tjsonToString(const SJson* pJson) {
41,911,670✔
164
  char* p = cJSON_Print((cJSON*)pJson);
41,911,670✔
165
  if (!p) {
41,914,136✔
166
    terrno = TSDB_CODE_OUT_OF_MEMORY;
×
167
  }
168
  return p;
41,908,905✔
169
}
170

171
char* tjsonToUnformattedString(const SJson* pJson) {
693,009,759✔
172
  char* p = cJSON_PrintUnformatted((cJSON*)pJson);
693,009,759✔
173
  if (!p) {
693,011,840✔
174
    terrno = TSDB_CODE_OUT_OF_MEMORY;
×
175
  }
176
  return p;
693,011,032✔
177
}
178

179
SJson* tjsonGetObjectItem(const SJson* pJson, const char* pName) { return cJSON_GetObjectItem(pJson, pName); }
2,147,483,647✔
180

181
int32_t tjsonGetObjectName(const SJson* pJson, char** pName) {
1,156✔
182
  *pName = ((cJSON*)pJson)->string;
1,156✔
183
  if (NULL == *pName) {
1,156✔
184
    return TSDB_CODE_FAILED;
×
185
  }
186
  return TSDB_CODE_SUCCESS;
1,156✔
187
}
188

189
int32_t tjsonGetObjectValueString(const SJson* pJson, char** pValueString) {
1,156✔
190
  *pValueString = ((cJSON*)pJson)->valuestring;
1,156✔
191
  if (NULL == *pValueString) {
1,156✔
192
    return TSDB_CODE_FAILED;
×
193
  }
194
  return TSDB_CODE_SUCCESS;
1,156✔
195
}
196

197
void tjsonGetObjectValueBigInt(const SJson* pJson, int64_t* pVal) { *pVal = (int64_t)((cJSON*)pJson)->valuedouble; }
×
198

199
void tjsonGetObjectValueDouble(const SJson* pJson, double* pVal) { *pVal = ((cJSON*)pJson)->valuedouble; }
×
200

201
int32_t tjsonGetStringValue(const SJson* pJson, const char* pName, char* pVal) {
×
202
  char* p = cJSON_GetStringValue(tjsonGetObjectItem((cJSON*)pJson, pName));
×
203
  if (NULL == p) {
×
204
    return TSDB_CODE_SUCCESS;
×
205
  }
206
  TAOS_STRCPY(pVal, p);
×
207
  return TSDB_CODE_SUCCESS;
×
208
}
209
int32_t tjsonGetStringValue1(const SJson* pJson, const char* pName, char* pVal, int32_t cap) {
696,708,848✔
210
  char* p = cJSON_GetStringValue(tjsonGetObjectItem((cJSON*)pJson, pName));
696,708,848✔
211
  if (NULL == p) {
696,743,433✔
212
    return TSDB_CODE_SUCCESS;
×
213
  }
214
  int32_t len = strlen(p);
696,743,433✔
215
  if (len >= cap) {
696,743,433✔
216
    return TSDB_CODE_OUT_OF_MEMORY;
×
217
  }
218
  TAOS_STRCPY(pVal, p);
696,743,433✔
219
  return TSDB_CODE_SUCCESS;
696,743,433✔
220
}
221

222
int32_t tjsonGetStringValue2(const SJson* pJson, const char* pName, char* pVal, int32_t maxLen) {
12,070✔
223
  char* p = cJSON_GetStringValue(tjsonGetObjectItem((cJSON*)pJson, pName));
12,070✔
224
  if (NULL == p) {
12,070✔
225
    return TSDB_CODE_SUCCESS;
×
226
  }
227
  int32_t len = strlen(p);
12,070✔
228
  if (len >= maxLen - 1) {
12,070✔
229
    return TSDB_CODE_OUT_OF_MEMORY;
×
230
  }
231
  if (pVal == NULL) {
12,070✔
232
    return TSDB_CODE_INVALID_PARA;
×
233
  } else {
234
    strcpy(pVal, p);
12,070✔
235
  }
236
  return TSDB_CODE_SUCCESS;
12,070✔
237
}
238

239
const char* tjsonGetStringPointer(const SJson* pJson, const char* pName) {
1,892✔
240
  return cJSON_GetStringValue(tjsonGetObjectItem((cJSON*)pJson, pName));
1,892✔
241
}
242

243
int32_t tjsonDupStringValue(const SJson* pJson, const char* pName, char** pVal) {
15,023,879✔
244
  char* p = cJSON_GetStringValue(tjsonGetObjectItem((cJSON*)pJson, pName));
15,023,879✔
245
  if (NULL == p) {
15,023,879✔
246
    return TSDB_CODE_SUCCESS;
2,578,791✔
247
  }
248
  *pVal = taosStrdup(p);
12,445,088✔
249
  return TSDB_CODE_SUCCESS;
12,445,088✔
250
}
251

252
int32_t tjsonGetBigIntValue(const SJson* pJson, const char* pName, int64_t* pVal) {
2,147,483,647✔
253
  char* p = cJSON_GetStringValue(tjsonGetObjectItem((cJSON*)pJson, pName));
2,147,483,647✔
254
  if (NULL == p) {
2,147,483,647✔
255
    return TSDB_CODE_SUCCESS;
18,370,008✔
256
  }
257
#ifdef WINDOWS
258
  sscanf(p, "%" PRId64, pVal);
259
#else
260
  *pVal = taosStr2Int64(p, NULL, 10);
2,145,261,995✔
261
#endif
262
  return TSDB_CODE_SUCCESS;
2,144,963,293✔
263
}
264

265
int32_t tjsonGetIntValue(const SJson* pJson, const char* pName, int32_t* pVal) {
809,723,445✔
266
  int64_t val = 0;
809,723,445✔
267
  int32_t code = tjsonGetBigIntValue(pJson, pName, &val);
809,788,310✔
268
  *pVal = val;
809,726,641✔
269
  return code;
809,707,788✔
270
}
271

272
int32_t tjsonGetSmallIntValue(const SJson* pJson, const char* pName, int16_t* pVal) {
311,455,846✔
273
  int64_t val = 0;
311,455,846✔
274
  int32_t code = tjsonGetBigIntValue(pJson, pName, &val);
311,465,359✔
275
  *pVal = val;
311,465,160✔
276
  return code;
311,469,297✔
277
}
278

279
int32_t tjsonGetTinyIntValue(const SJson* pJson, const char* pName, int8_t* pVal) {
122,400,372✔
280
  int64_t val = 0;
122,400,372✔
281
  int32_t code = tjsonGetBigIntValue(pJson, pName, &val);
122,400,644✔
282
  *pVal = val;
122,404,959✔
283
  return code;
122,404,959✔
284
}
285

286
int32_t tjsonGetUBigIntValue(const SJson* pJson, const char* pName, uint64_t* pVal) {
632,225,734✔
287
  char* p = cJSON_GetStringValue(tjsonGetObjectItem((cJSON*)pJson, pName));
632,225,734✔
288
  if (NULL == p) {
632,224,661✔
289
    return TSDB_CODE_SUCCESS;
×
290
  }
291
#ifdef WINDOWS
292
  sscanf(p, "%" PRIu64, pVal);
293
#else
294
  *pVal = taosStr2UInt64(p, NULL, 10);
632,224,661✔
295
#endif
296
  return TSDB_CODE_SUCCESS;
632,199,292✔
297
}
298

299
int32_t tjsonGetUIntValue(const SJson* pJson, const char* pName, uint32_t* pVal) {
3,968,616✔
300
  uint64_t val = 0;
3,968,616✔
301
  int32_t  code = tjsonGetUBigIntValue(pJson, pName, &val);
3,968,616✔
302
  *pVal = val;
3,968,616✔
303
  return code;
3,968,616✔
304
}
305

306
int32_t tjsonGetUSmallIntValue(const SJson* pJson, const char* pName, uint16_t* pVal) {
1,274,303✔
307
  uint64_t val = 0;
1,274,303✔
308
  int32_t  code = tjsonGetUBigIntValue(pJson, pName, &val);
1,274,303✔
309
  *pVal = val;
1,274,303✔
310
  return code;
1,274,303✔
311
}
312

313
int32_t tjsonGetUTinyIntValue(const SJson* pJson, const char* pName, uint8_t* pVal) {
552,265,826✔
314
  uint64_t val = 0;
552,265,826✔
315
  int32_t  code = tjsonGetUBigIntValue(pJson, pName, &val);
552,185,618✔
316
  *pVal = val;
552,286,414✔
317
  return code;
552,287,290✔
318
}
319

320
int32_t tjsonGetBoolValue(const SJson* pJson, const char* pName, bool* pVal) {
729,949,371✔
321
  const SJson* pObject = tjsonGetObjectItem(pJson, pName);
729,949,371✔
322
  if (NULL == pObject) {
729,956,608✔
323
    return TSDB_CODE_SUCCESS;
×
324
  }
325
  if (!cJSON_IsBool(pObject)) {
729,956,608✔
326
    return TSDB_CODE_FAILED;
×
327
  }
328
  *pVal = cJSON_IsTrue(pObject) ? true : false;
729,946,087✔
329
  return TSDB_CODE_SUCCESS;
729,947,659✔
330
}
331

332
int32_t tjsonGetDoubleValue(const SJson* pJson, const char* pName, double* pVal) {
25,767,173✔
333
  const SJson* pObject = tjsonGetObjectItem(pJson, pName);
25,767,173✔
334
  if (NULL == pObject) {
25,769,503✔
335
    return TSDB_CODE_SUCCESS;
1,155,129✔
336
  }
337
  if (!cJSON_IsNumber(pObject)) {
24,614,374✔
338
    return TSDB_CODE_FAILED;
×
339
  }
340
  *pVal = cJSON_GetNumberValue(pObject);
24,614,651✔
341
  return TSDB_CODE_SUCCESS;
24,614,235✔
342
}
343

344
bool tjsonIsArray(const SJson* pJson) { return cJSON_IsArray(pJson); }
753,470✔
345

346
int32_t tjsonGetArraySize(const SJson* pJson) { return cJSON_GetArraySize(pJson); }
94,453,500✔
347

348
SJson* tjsonGetArrayItem(const SJson* pJson, int32_t index) { return cJSON_GetArrayItem(pJson, index); }
185,754,147✔
349

350
int32_t tjsonToObject(const SJson* pJson, const char* pName, FJsonToObject func, void* pObj) {
463,292,982✔
351
  SJson* pJsonObj = tjsonGetObjectItem(pJson, pName);
463,292,982✔
352
  if (NULL == pJsonObj) {
463,326,484✔
353
    return TSDB_CODE_SUCCESS;
5,988,154✔
354
  }
355
  return func(pJsonObj, pObj);
457,338,330✔
356
}
357

358
int32_t tjsonMakeObject(const SJson* pJson, const char* pName, FJsonToObject func, void** pObj, int32_t objSize) {
1,714,289✔
359
  if (objSize <= 0) {
1,714,289✔
360
    return TSDB_CODE_SUCCESS;
1,038,465✔
361
  }
362

363
  SJson* pJsonObj = tjsonGetObjectItem(pJson, pName);
675,824✔
364
  if (NULL == pJsonObj) {
675,824✔
365
    return TSDB_CODE_SUCCESS;
×
366
  }
367
  *pObj = taosMemoryCalloc(1, objSize);
675,824✔
368
  if (NULL == *pObj) {
675,824✔
369
    return terrno;
×
370
  }
371
  return func(pJsonObj, *pObj);
675,824✔
372
}
373

374
int32_t tjsonToArray(const SJson* pJson, const char* pName, FJsonToObject func, void* pArray, int32_t itemSize) {
11,363,694✔
375
  const cJSON* jArray = tjsonGetObjectItem(pJson, pName);
11,363,694✔
376
  int32_t      size = (NULL == jArray ? 0 : tjsonGetArraySize(jArray));
11,363,694✔
377
  for (int32_t i = 0; i < size; ++i) {
24,056,908✔
378
    int32_t code = func(tjsonGetArrayItem(jArray, i), (char*)pArray + itemSize * i);
12,693,214✔
379
    if (TSDB_CODE_SUCCESS != code) {
12,693,214✔
380
      return code;
×
381
    }
382
  }
383
  return TSDB_CODE_SUCCESS;
11,363,694✔
384
}
385

386
int32_t tjsonToTArray(const SJson* pJson, const char* pName, FJsonToObject func, SArray** pArray, int32_t itemSize) {
9,094,994✔
387
  const cJSON* jArray = tjsonGetObjectItem(pJson, pName);
9,094,994✔
388
  int32_t      size = tjsonGetArraySize(jArray);
9,094,994✔
389
  if (size > 0) {
9,094,994✔
390
    *pArray = taosArrayInit_s(itemSize, size);
4,192,630✔
391
    if (NULL == *pArray) {
4,192,630✔
392
      return terrno;
×
393
    }
394
    for (int32_t i = 0; i < size; ++i) {
11,333,669✔
395
      int32_t code = func(tjsonGetArrayItem(jArray, i), taosArrayGet(*pArray, i));
7,141,039✔
396
      if (TSDB_CODE_SUCCESS != code) {
7,141,039✔
397
        return code;
×
398
      }
399
    }
400
  }
401
  return TSDB_CODE_SUCCESS;
9,094,994✔
402
}
403

404
SJson* tjsonParse(const char* pStr) { return cJSON_Parse(pStr); }
18,925,345✔
405

406
bool tjsonValidateJson(const char* jIn) {
×
407
  if (!jIn) {
×
408
    return false;
×
409
  }
410

411
  // set json real data
412
  cJSON* root = cJSON_Parse(jIn);
×
413
  if (root == NULL) {
×
414
    return false;
×
415
  }
416

417
  if (!cJSON_IsObject(root)) {
×
418
    return false;
×
419
  }
420
  int size = cJSON_GetArraySize(root);
×
421
  for (int i = 0; i < size; i++) {
×
422
    cJSON* item = cJSON_GetArrayItem(root, i);
×
423
    if (!item) {
×
424
      return false;
×
425
    }
426

427
    char* jsonKey = item->string;
×
428
    if (!jsonKey) return false;
×
429
    for (size_t j = 0; j < strlen(jsonKey); ++j) {
×
430
      if (isprint(jsonKey[j]) == 0) return false;
×
431
    }
432

433
    if (item->type == cJSON_Object || item->type == cJSON_Array) {
×
434
      return false;
×
435
    }
436
  }
437
  return true;
×
438
}
439

440
const char* tjsonGetError() { return cJSON_GetErrorPtr(); }
×
441

442
void tjsonDeleteItemFromObject(const SJson* pJson, const char* pName) {
634✔
443
  cJSON_DeleteItemFromObject((cJSON*)pJson, pName);
634✔
444
}
634✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc