split an text stream into JSON objects