[C][Client] Set the default value for the null json (#12620)

This commit is contained in:
Hui Yu 2022-06-17 15:01:33 +08:00 committed by GitHub
parent 8b7736501d
commit bcb5f55a2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ cJSON *object_convertToJSON(object_t *object) {
}
if (!object->temporary) {
return cJSON_Parse("{}");
return cJSON_Parse("null");
}
return cJSON_Parse(object->temporary);

View File

@ -28,7 +28,7 @@ cJSON *object_convertToJSON(object_t *object) {
}
if (!object->temporary) {
return cJSON_Parse("{}");
return cJSON_Parse("null");
}
return cJSON_Parse(object->temporary);