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
This commit is contained in:
Eric Haszlakiewicz
2011-05-03 20:40:49 +00:00
parent e2e16011f0
commit 886c4fbebf
4 changed files with 33 additions and 16 deletions

View File

@@ -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