src/json.c

changeset 1075
0cc4b63a0ae0
parent 1072
c89283cd559b
child 1077
911a154dd469
equal deleted inserted replaced
1074:e8e2813cdda6 1075:0cc4b63a0ae0
417 if (json->vbuf != json->vbuf_internal) { 417 if (json->vbuf != json->vbuf_internal) {
418 free(json->vbuf); 418 free(json->vbuf);
419 } 419 }
420 cxJsonValueFree(json->parsed); 420 cxJsonValueFree(json->parsed);
421 json->parsed = NULL; 421 json->parsed = NULL;
422 if (json->uncompleted_member.name.ptr != NULL) {
423 cx_strfree_a(json->allocator, &json->uncompleted_member.name);
424 json->uncompleted_member = (CxJsonObjValue){{NULL, 0}, NULL};
425 }
422 } 426 }
423 427
424 int cxJsonFilln(CxJson *json, const char *buf, size_t size) { 428 int cxJsonFilln(CxJson *json, const char *buf, size_t size) {
425 if (cxBufferEof(&json->buffer)) { 429 if (cxBufferEof(&json->buffer)) {
426 // reinitialize the buffer 430 // reinitialize the buffer

mercurial