Eliminate usage of cJSON_Add*ToObject.

These functions don't provide the necessary error handling capabilities.