Stream responses to the JSON decoder

rather than first reading the message into memory then decoding to JSON
Check for the length of the JSON array before using

I've had panics after receiving an empty array from a subscription
Merge branch 'check-length'