summaryrefslogtreecommitdiff
path: root/json-glib/json-builder.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2014-12-20 23:22:09 +0000
committerPhilip Withnall <philip.withnall@collabora.co.uk>2015-01-25 17:02:31 +0000
commit1f6668a9534c01523361075dad290c0dc49d7623 (patch)
treee8c14076f3145ef40694ea5e9f6a558b9cf88abd /json-glib/json-builder.c
parent23e69e79484d41c722ab8bcab78fe850b960316e (diff)
downloadjson-glib-1f6668a9534c01523361075dad290c0dc49d7623.tar.gz
reader: Maintain a stack of member names
This fixes the case where, with nested objects, we call: json_reader_read_member (reader, "outer"); // json_reader_get_member_name (reader) == "outer" json_reader_read_member (reader, "inner"); // json_reader_get_member_name (reader) == "inner" // do something useful json_reader_end_member (reader); but at the end, the following assertion no longer holds: // json_reader_get_member_name (reader) == "outer" even though the JsonReader state should have been reset after ending the inner node. Fix it by maintaining a stack of member names. This works with both json_reader_read_member() and json_reader_read_element(). Updates to the unit tests are included. https://bugzilla.gnome.org/show_bug.cgi?id=741824
Diffstat (limited to 'json-glib/json-builder.c')
0 files changed, 0 insertions, 0 deletions