[BZ#785803] Clarify that it's an error to use json_object_get_*_member with a non-existing member
Submitted by Debarshi Ray <<ris..@...se>>
Assigned to json-glib-maint@gnome.bugs
Link to original bug (#785803)
Description
I discovered this anti-pattern in gnome-online-accounts that has been copied around by multiple people:
fubar = json_object_get_string_member (json_object, "fubar"); if (fubar == NULL) { /* throw an error */ }
It might be better to clarify that it is a programmer error to specify a member that doesn't exist. Bug 754384 touched upon this but only for json_object_get_object_member.