diff -r cc153bffea28 -r bff0a078523d docs/Writerside/topics/json.h.md --- a/docs/Writerside/topics/json.h.md Fri Aug 15 17:42:01 2025 +0200 +++ b/docs/Writerside/topics/json.h.md Fri Aug 15 17:44:19 2025 +0200 @@ -104,8 +104,12 @@ CxJsonValue *cxJsonArrGet(const CxJsonValue *value, size_t index); +CxJsonValue *cxJsonArrRemove(const CxJsonValue *value, size_t index); + CxJsonValue *cxJsonObjGet(const CxJsonValue *value, AnyStr name); +CxJsonValue *cxJsonObjRemove(const CxJsonValue *value, AnyStr name); + CxIterator cxJsonArrIter(const CxJsonValue *value); CxIterator cxJsonObjIter(const CxJsonValue *value); @@ -132,13 +136,17 @@ The function `cxJsonArraySize()` returns the number of items in an array value, which can be accessed via index with `cxJsonArrGet()` or via an iterator created with `cxJsonArrIter()`. +An element can be removed from an array with `cxJsonArrRemove()`. -The function `cxJsonObjGet()` returns the member in a JSON object associated with the specified `name`. +The function `cxJsonObjGet()` returns the member in a JSON object associated with the specified `name`. +To remove a member, use `cxJsonObjRemove()`. > Both `cxJsonArrGet()` and `cxJsonObjGet()` are safe regarding access to non-existing values. > > When `cxJsonArrGet()` is used with an out-of-bounds index, or `cxJsonObjGet()` is used with a non-existent name, > they return a JSON value, that returns `false` for any `cxJsonIsXYZ()` function. +> +> This is **not** the case for `cxJsonArrRemove()` and `cxJsonObjRemove()`, which return `NULL` in that case. > If you don't have full control over the JSON data, you should always check the datatype of a value first, before accessing it. >{style="note"}