You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Good afternoon.
I am using cJSON v1.7.12. I am trying to create a json of the form: { "status":"text", "num": 123 }
For this, I use the following code:
`
cJSON *monitor = cJSON_CreateObject();
if (monitor == NULL)
{
cJSON_Delete(monitor);
ESP_LOGE(TAG, "Error create json");
}
cJSON *status = cJSON_CreateString("text");
Good afternoon.
I am using cJSON v1.7.12. I am trying to create a json of the form:
{ "status":"text", "num": 123 }
For this, I use the following code:
`
cJSON *monitor = cJSON_CreateObject();
if (monitor == NULL)
{
cJSON_Delete(monitor);
ESP_LOGE(TAG, "Error create json");
}
cJSON *status = cJSON_CreateString("text");
if (status == NULL)
{
cJSON_Delete(monitor);
ESP_LOGE(TAG, "Error create status");
}
`
I found that if cJSON_CreateNumber is in my code, then the cJSON_Print function returns null. What is the reason for this problem?
The text was updated successfully, but these errors were encountered: