diff -r 0ecb13118cac -r 46d8a8305948 src/json.c --- a/src/json.c Sun Dec 14 23:17:48 2025 +0100 +++ b/src/json.c Mon Dec 15 19:00:51 2025 +0100 @@ -549,13 +549,9 @@ memset(json, 0, sizeof(CxJson)); json->allocator = allocator; - json->states.data = json->states_internal; - json->states.capacity = cx_nmemb(json->states_internal); + cx_array_init_fixed(json->states, json->states_internal, 1); json->states.data[0] = JP_STATE_VALUE_BEGIN; - json->states.size = 1; - - json->vbuf.data = json->vbuf_internal; - json->vbuf.capacity = cx_nmemb(json->vbuf_internal); + cx_array_init_fixed(json->vbuf, json->vbuf_internal, 0); } void cxJsonDestroy(CxJson *json) {