[BZ#758578] Errors set from methods other than json_reader_read_*() cause json_reader_end_* to not reposition cursor
Submitted by Robert Ancell <<rob..@..com>>
Assigned to json-glib-maint@gnome.bugs
Link to original bug (#758578)
Description
Created attachment 316143 Test case showing iteration over an array stops once hitting an invalid value in the first element
json_reader_end_element/member clear errors if they have occurred. If an error occurred, they do not reposition the cursor. This seems to be a mistaken assumption that the error was generated in json_reader_read_element/member. Many other functions can generate errors - this means that a single error can stop correct iteration over a JSON object. See attached test case.