Use transducer to combine stream responses into valid JSON.