Skip to content

Commit

Permalink
Merge pull request #153 from LeSpocky/doc
Browse files Browse the repository at this point in the history
improve doc for json_object_to_json_string()
  • Loading branch information
hawicz committed Sep 14, 2014
2 parents 6ec6fda + 37f5d86 commit ec4879a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions json_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,17 @@ extern enum json_type json_object_get_type(struct json_object *obj);

/** Stringify object to json format.
* Equivalent to json_object_to_json_string_ext(obj, JSON_C_TO_STRING_SPACED)
* The pointer you get is an internal of your json object. You don't
* have to free it, later use of json_object_put() should be sufficient.
* If you can not ensure there's no concurrent access to *obj use
* strdup().
* @param obj the json_object instance
* @returns a string in JSON format
*/
extern const char* json_object_to_json_string(struct json_object *obj);

/** Stringify object to json format
* @see json_object_to_json_string() for details on how to free string.
* @param obj the json_object instance
* @param flags formatting options, see JSON_C_TO_STRING_PRETTY and other constants
* @returns a string in JSON format
Expand Down

0 comments on commit ec4879a

Please sign in to comment.