diff options
author | Garrett Regier <garrettregier@gmail.com> | 2017-06-16 17:14:35 -0700 |
---|---|---|
committer | Garrett Regier <garrettregier@gmail.com> | 2017-06-16 17:16:32 -0700 |
commit | 0c01de6d988539a3929f0ee9bbc39f1245ae0cdf (patch) | |
tree | 89d63c55b34944d209bfbef24c15328d6d8c10a6 /json-glib/json-generator.h | |
parent | d78ad648942637fb9212d1d93670509d4c7f687b (diff) | |
download | json-glib-0c01de6d988539a3929f0ee9bbc39f1245ae0cdf.tar.gz |
generator: Add an GString-based method
This allows callers to avoid extra allocations
when dumping to a preexisting string.
https://bugzilla.gnome.org/show_bug.cgi?id=773504
Diffstat (limited to 'json-glib/json-generator.h')
-rw-r--r-- | json-glib/json-generator.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/json-glib/json-generator.h b/json-glib/json-generator.h index 194495a..30a28dc 100644 --- a/json-glib/json-generator.h +++ b/json-glib/json-generator.h @@ -102,6 +102,10 @@ void json_generator_set_root (JsonGenerator *generator, JSON_AVAILABLE_IN_1_0 JsonNode * json_generator_get_root (JsonGenerator *generator); +JSON_AVAILABLE_IN_1_4 +GString *json_generator_to_gstring (JsonGenerator *generator, + GString *string); + JSON_AVAILABLE_IN_1_0 gchar * json_generator_to_data (JsonGenerator *generator, gsize *length); |