For every function in cJSON.h that takes a string or returns one or allocates memory. Let's create a new function cJSON_..._s that takes/returns size arguments and gets a pointer to an instance of cJSON_Hooks, see #57 and #5.
By doing this, the current functions could still remain, but be wrappers to the safer alternatives. Once the handling of size arguments are implemented, the wrappers would need to get it using strlen.
Examples:
cJSON *cJSON_Parse_s(const char *value, size_t length, const cJSON_Hooks * const allocators);
char *cJSON_Print_s(const cJSON *item, size_t * const printed_length, const cJSON_Hooks * const allocators);