parser: Consolidate value parsing
parser: Consolidate value parsing

Instead of doing a preliminary check when parsing arrays and objects, we
should just call json_parse_value() and let it handle all the valid
values and eventual error cases. This simplifies error handling and
makes it more reliable.

oerdnj/json-glib,Distrotech/json-glib,GNOME/json-glib,oerdnj/json-glib,frida/json-glib,frida/json-glib,ebassi/json-glib,brauliobo/json-glib,oerdnj/json-glib,ebassi/json-glib,brauliobo/json-glib,oerdnj/json-glib,Distrotech/json-glib,brauliobo/json-glib,GNOME/json-glib,Distrotech/json-glib,ebassi/json-glib