| 483 // add the new value to a possible parent |
483 // add the new value to a possible parent |
| 484 if (json->vbuf.size > 0) { |
484 if (json->vbuf.size > 0) { |
| 485 CxJsonValue *parent = json->vbuf.data[json->vbuf.size - 1]; |
485 CxJsonValue *parent = json->vbuf.data[json->vbuf.size - 1]; |
| 486 assert(parent != NULL); |
486 assert(parent != NULL); |
| 487 if (parent->type == CX_JSON_ARRAY) { |
487 if (parent->type == CX_JSON_ARRAY) { |
| 488 if (cx_array_add_a(json->allocator, parent->array, &v)) { |
488 if (cx_array_add_a(json->allocator, parent->array, v)) { |
| 489 goto create_json_value_exit_error; // LCOV_EXCL_LINE |
489 goto create_json_value_exit_error; // LCOV_EXCL_LINE |
| 490 } |
490 } |
| 491 } else if (parent->type == CX_JSON_OBJECT) { |
491 } else if (parent->type == CX_JSON_OBJECT) { |
| 492 // the member was already created after parsing the name |
492 // the member was already created after parsing the name |
| 493 // store the pointer of the uncompleted value in the map |
493 // store the pointer of the uncompleted value in the map |