GNOME Bugzilla – Bug 707100
Expose current node on JsonReader
Last modified: 2017-09-05 10:40:11 UTC
It would be nice if JsonReader exposed its current_node as a property with a getter, so that clients can always get a JsonNode out of the reader easily. At the moment, I believe this is only possible by calling json_reader_get_value() for value nodes, and by manually extracting and re-building the JsonNode for objects or arrays. Use case: my JSON parser needs to save JSON which it doesn’t recognise (e.g. as introduced in later versions of the specification it conforms to) so that it can re-inject them into JSON objects which are being re-uploaded to a server. This prevents data loss. I want to grab a JsonNode for each unrecognised member of a JSON object.
-- 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/9.