summaryrefslogtreecommitdiff
path: root/json_object.h
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2016-05-23 03:02:34 +0000
committerEric Haszlakiewicz <erh+git@nimenees.com>2016-05-23 03:02:34 +0000
commit7ae5c3f7a679fa52e8366f846a98b513e83ffc20 (patch)
tree659e6c671fd4672320b674c465c173cc354bf4a3 /json_object.h
parent5e4e5f7d9df01084b025d1fc619ca9ce9dcceef3 (diff)
downloadjson-c-7ae5c3f7a679fa52e8366f846a98b513e83ffc20.tar.gz
Issue #142: un-deprecate json_object_object_get(), but note why you might want to use json_object_object_get_ex() instead.
Diffstat (limited to 'json_object.h')
-rw-r--r--json_object.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/json_object.h b/json_object.h
index 669f8d2..d8090f8 100644
--- a/json_object.h
+++ b/json_object.h
@@ -337,7 +337,11 @@ extern int json_object_object_add(struct json_object* obj, const char *key,
extern void json_object_object_add_ex(struct json_object* obj, const char *key,
struct json_object *val, const unsigned opts);
-/** Get the json_object associate with a given object field
+/** Get the json_object associate with a given object field.
+ *
+ * This returns NULL if the field is found but its value is null, or if
+ * the field is not found, or if obj is not a json_type_object. If you
+ * need to distinguis between these cases, use json_object_object_get_ex().
*
* *No* reference counts will be changed. There is no need to manually adjust
* reference counts through the json_object_put/json_object_get methods unless
@@ -354,8 +358,8 @@ extern void json_object_object_add_ex(struct json_object* obj, const char *key,
* @returns the json_object associated with the given field name
* @deprecated Please use json_object_object_get_ex
*/
-THIS_FUNCTION_IS_DEPRECATED(extern struct json_object* json_object_object_get(const struct json_object* obj,
- const char *key));
+extern struct json_object* json_object_object_get(const struct json_object* obj,
+ const char *key);
/** Get the json_object associated with a given object field.
*