diff -r 68b75c091028 -r 55b13f583356 src/json.c --- a/src/json.c Sun Dec 14 16:21:09 2025 +0100 +++ b/src/json.c Sun Dec 14 17:30:17 2025 +0100 @@ -453,11 +453,10 @@ } static CxJsonObject json_create_object_map(const CxAllocator *allocator) { - CxMap *map = cxKvListCreateAsMap(allocator, (cx_compare_func) cxJsonCompare, CX_STORE_POINTERS); + CxMap *map = cxKvListCreateAsMap(allocator, CX_STORE_POINTERS); if (map == NULL) return NULL; // LCOV_EXCL_LINE - // TODO: fix the specification of the compare function - map->collection.cmpfunc = (cx_compare_func) cxJsonCompare; - cxDefineDestructor(map, cxJsonValueFree); + cxSetCompareFunc(map, cxJsonCompare); + cxSetDestructor(map, cxJsonValueFree); return map; }