diff options
author | Emmanuele Bassi <ebassi@openedhand.com> | 2007-11-13 09:28:57 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@openedhand.com> | 2007-11-13 09:28:57 +0000 |
commit | a7c39c910e08093ee0d0723685005623f26b9eae (patch) | |
tree | 19a4633a1020bce99750a9e62566592d43d45d89 /json-glib/json-gobject.c | |
parent | 6132d7325c33e26740b4c955d8ccbe53fd817cd8 (diff) | |
download | json-glib-a7c39c910e08093ee0d0723685005623f26b9eae.tar.gz |
Add the JsonGenerator:root property
JsonGenerator now has a :root property, so it can be constructed using
just g_object_new():
generator = g_object_new (JSON_TYPE_GENERATOR,
"pretty", TRUE,
"indent", 4,
"root", node,
NULL);
This means that the root node is copied inside the generator, instead of
just taking ownership (it was quite confusing). The documentation now
clearly states what happens, and that you can safely free the node after
feeding it to the JsonGenerator.
Diffstat (limited to 'json-glib/json-gobject.c')
0 files changed, 0 insertions, 0 deletions