parser: Use the right length for parsing the stream contents
parser: Use the right length for parsing the stream contents

The ByteArray we use to buffer the contents of a stream in order to
pass them to the parser may have a bigger length. We should use the
cursor position that we use to put a '\0' in the buffer instead. We
could also use -1, but this saves us a strlen() later on.

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