mirror of
https://github.com/json-c/json-c.git
synced 2026-11-08 22:50:47 +08:00
Adjust json_object_is_type and json_object_get_type so they return json_type_null for NULL objects.
This commit is contained in:
1 parent
7e57d63aeb
commit
aef439a175
4 files changed
+65
No files matched your search
@@ -79,6 +79,7 @@ extern void json_object_put(struct json_object *obj);
|
||||
* Check if the json_object is of a given type
|
||||
* @param obj the json_object instance
|
||||
* @param type one of:
|
||||
json_type_null (i.e. obj == NULL),
|
||||
json_type_boolean,
|
||||
json_type_double,
|
||||
json_type_int,
|
||||
@@ -92,6 +93,7 @@ extern int json_object_is_type(struct json_object *obj, enum json_type type);
|
||||
* Get the type of the json_object
|
||||
* @param obj the json_object instance
|
||||
* @returns type being one of:
|
||||
json_type_null (i.e. obj == NULL),
|
||||
json_type_boolean,
|
||||
json_type_double,
|
||||
json_type_int,
|
||||
|
||||
Reference in new issue
Block a user