update json_object_new_string_len, json_escape_str (internal). Writer handles \x00 correctly

Added parse_null test. This does not change anything with how the parser handles \u0000 or null characters

This commit is addapted from one by Adomas Paltanavičius <adomas@leanholding.com>



git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@63 327403b1-1117-474d-bef2-5cb71233fd97
This commit is contained in:
Jehiah Czebotar
2011-01-14 17:23:06 +00:00
parent a503ee8217
commit ac601b5b5f
7 changed files with 94 additions and 18 deletions

View File

@@ -337,6 +337,16 @@ extern struct json_object* json_object_new_string_len(const char *s, int len);
*/
extern const char* json_object_get_string(struct json_object *obj);
/** Get the string length of a json_object
*
* If the passed object is not of type json_type_string then zero
* will be returned.
*
* @param obj the json_object instance
* @returns int
*/
extern int json_object_get_string_len(struct json_object *obj);
#ifdef __cplusplus
}
#endif