After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 698379 - JsonBuilder doesn't take ownership of added JsonNode
JsonBuilder doesn't take ownership of added JsonNode
Status: RESOLVED OBSOLETE
Product: json-glib
Classification: Core
Component: Documentation
git master
Other Linux
: Normal enhancement
: ---
Assigned To: json-glib-maint
json-glib-maint
Depends on:
Blocks:
 
 
Reported: 2013-04-19 16:29 UTC by d912e3
Modified: 2017-09-05 10:39 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description d912e3 2013-04-19 16:29:25 UTC
In both valid add cases in the json_builder_add_value function, the value's ownership is fully transferred. See:

  * json_object_set_member
  * json_array_add_element

Hence, shouldn't the builder itself take the ownership of the node?
Comment 1 Emmanuele Bassi (:ebassi) 2013-12-02 12:11:58 UTC
the JsonBuilder API is a convenience wrapper around the low-level Node, Object, and Array API; the Builder only retains minimal state.

the documentation should probably be more clear about it, though. care to write a patch?
Comment 2 Emmanuele Bassi (:ebassi) 2017-09-05 10:39:33 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/json-glib/issues/6.