summaryrefslogtreecommitdiff
path: root/json_util.h
diff options
context:
space:
mode:
authorEric Haszlakiewicz <ehaszla@transunion.com>2011-05-03 20:40:49 +0000
committerEric Haszlakiewicz <ehaszla@transunion.com>2011-05-03 20:40:49 +0000
commit886c4fbebfd0d276235277059193e6aad18fe259 (patch)
tree3d3d51ed76ad933d99d4b980d83f6e24ac5f9eb1 /json_util.h
parente2e16011f0839a1861754105b2268588a11776c6 (diff)
downloadjson-c-886c4fbebfd0d276235277059193e6aad18fe259.tar.gz
Add a json_type_to_name() function which returns a string that describes the type. Useful for logging.
git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@67 327403b1-1117-474d-bef2-5cb71233fd97
Diffstat (limited to 'json_util.h')
-rw-r--r--json_util.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/json_util.h b/json_util.h
index fbfcb14..a77305e 100644
--- a/json_util.h
+++ b/json_util.h
@@ -25,6 +25,12 @@ extern struct json_object* json_object_from_file(const char *filename);
extern int json_object_to_file(char *filename, struct json_object *obj);
extern int json_parse_int64(const char *buf, int64_t *retval);
+/**
+ * Return a string describing the type of the object.
+ * e.g. "int", or "object", etc...
+ */
+extern const char *json_type_to_name(enum json_type o_type);
+
#ifdef __cplusplus
}
#endif