Listening for both json streams and text streams