- json_chunks = json_dechunker.read_json_chunks()
- for json in json_chunks:
- yield wrap_response(json, headers)
- if json_chunks:
- timer.reset()
+ # Decode all the things:
+ data = sock_reader.read()
+ dechunked_data, end_of_stream, decode_error = chunk_decoder.decode(data)
+ unicode_data = utf8_decoder.decode(dechunked_data)
+ json_data = json_decoder.decode(unicode_data)
+
+ # Yield data-like things:
+ for json_obj in json_data:
+ yield wrap_response(json_obj, headers)
+
+ # Reset timers:
+ if dechunked_data: