-
Notifications
You must be signed in to change notification settings - Fork 838
Behavior of null values is undocumented #714
Copy link
Copy link
Open
Description
The latest version of the API documentation doesn't seem to clearly state what the expected behavior of NULL values for the object and array functions are. Looking at the implementation, passing a NULL value seems to be treated as an error:
int json_object_setn_new_nocheck(json_t *json, const char *key, size_t key_len,
json_t *value) {
json_object_t *object;
if (!value)
return -1;Would it be possible to clearly document the cases where NULL values are safe to use? The only mention of a value that must not be NULL is for json_typeof().
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels