cJSON v1.7.14 Release Notes

Release Date: 2020-09-03 // 6 months ago
  • Note:

    Since v1.7.13 changed the stucture of linkedlist to improve the efficiency of adding item to array/object, array->child->prev now is point to tail node, this won't change any behavior except for backward through the linkedlist.
    The current backward through the linkedlist could be in this way:

    cJSON *last = ...; // the last is known
    cJSON *current_item = last;
    do {
        current_item = current_item->prev;
    } while(current_item != last);

    ๐Ÿ›  Fixes:

    • โšก๏ธ optimize the way to find tail node, see #503
    • ๐Ÿ›  Fix WError error on macosx because NAN is a float. Thanks @sappo, see #484
    • ๐Ÿ›  Fix some bugs in detach and replace. Thanks @miaoerduo, see #456

Previous changes from v1.7.13

  • ๐Ÿ”‹ Features:

    • โž• add new API of cJSON_ParseWithLength without breaking changes. Thanks @caglarivriz, see #358
    • โž• add new API of cJSON_GetNumberValue. Thanks @Intuition, see#385
    • โž• add uninstall target function for CMake. See #402
    • ๐Ÿ‘Œ Improve performance of adding item to array. Thanks @xiaomianhehe, see #430, #448
    • โž• add new API of cJSON_SetValuestring, for changing the valuestring safely. See #451
    • โž• add return value for cJSON_AddItemTo... and cJSON_ReplaceItem... (check if the operation successful). See #453

    ๐Ÿ›  Fixes:

    • ๐Ÿ›  Fix clang -Wfloat-equal warning. Thanks @paulmalovanyi, see #368
    • ๐Ÿ›  Fix make failed in mac os. See #405
    • ๐Ÿ›  Fix memory leak in cJSONUtils_FindPointerFromObjectTo. Thanks @andywolk for reporting, see #414