--- a/src/cx/json.h Tue Dec 10 00:09:55 2024 +0100 +++ b/src/cx/json.h Tue Dec 10 00:19:45 2024 +0100 @@ -39,6 +39,7 @@ #include "common.h" #include "allocator.h" #include "string.h" +#include "buffer.h" #include "array_list.h" #ifdef __cplusplus @@ -129,9 +130,7 @@ struct cx_json_s { const CxAllocator *allocator; - const char *buffer; - size_t size; - size_t pos; + CxBuffer buffer; CxJsonToken uncompleted; @@ -194,10 +193,6 @@ */ CX_JSON_OK, /** - * Input buffer is \c NULL. - */ - CX_JSON_NULL_INPUT, - /** * Allocating memory for the internal buffer failed. */ CX_JSON_BUFFER_ALLOC_FAILED,