| Index: sdk/lib/convert/json.dart
|
| diff --git a/sdk/lib/convert/json.dart b/sdk/lib/convert/json.dart
|
| index 910b8cc4bb16af3df58490b71604a07dcea0ad81..4b7817fc390f7e3ee9bd3b7a3c983c7b26f9887f 100644
|
| --- a/sdk/lib/convert/json.dart
|
| +++ b/sdk/lib/convert/json.dart
|
| @@ -326,39 +326,12 @@ class JsonDecoder extends Converter<String, Object> {
|
| *
|
| * The output [sink] receives exactly one decoded element through `add`.
|
| */
|
| - StringConversionSink startChunkedConversion(Sink<Object> sink) {
|
| - return new _JsonDecoderSink(_reviver, sink);
|
| - }
|
| + external StringConversionSink startChunkedConversion(Sink<Object> sink);
|
|
|
| // Override the base-classes bind, to provide a better type.
|
| Stream<Object> bind(Stream<String> stream) => super.bind(stream);
|
| }
|
|
|
| -/**
|
| - * Implements the chunked conversion from a JSON string to its corresponding
|
| - * object.
|
| - *
|
| - * The sink only creates one object, but its input can be chunked.
|
| - */
|
| -// TODO(floitsch): don't accumulate everything before starting to decode.
|
| -class _JsonDecoderSink extends _StringSinkConversionSink {
|
| - final _Reviver _reviver;
|
| - final Sink<Object> _sink;
|
| -
|
| - _JsonDecoderSink(this._reviver, this._sink)
|
| - : super(new StringBuffer());
|
| -
|
| - void close() {
|
| - super.close();
|
| - StringBuffer buffer = _stringSink;
|
| - String accumulated = buffer.toString();
|
| - buffer.clear();
|
| - Object decoded = _parseJson(accumulated, _reviver);
|
| - _sink.add(decoded);
|
| - _sink.close();
|
| - }
|
| -}
|
| -
|
| // Internal optimized JSON parsing implementation.
|
| external _parseJson(String source, reviver(key, value));
|
|
|
|
|