This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Expand file tree Collapse file tree 4 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -689,7 +689,7 @@ abstract class Stream<T> {
689689 }
690690
691691 /**
692- * Applies [streamTransformer] to this stream.
692+ * Applies [streamTransformer] to this stream.
693693 *
694694 * Returns the transformed stream,
695695 * that is, the result of `streamTransformer.bind(this)` .
Original file line number Diff line number Diff line change @@ -181,6 +181,9 @@ class JsonCodec extends Codec<Object, String> {
181181}
182182
183183/// This class converts JSON objects to strings.
184+ ///
185+ /// When used as a [StreamTransformer] , this converter does not promise
186+ /// that the input object is emitted as a single string event.
184187class JsonEncoder extends Converter <Object , String > {
185188 /// The string used for indention.
186189 ///
@@ -470,7 +473,14 @@ class _JsonUtf8EncoderSink extends ChunkedConversionSink<Object> {
470473 }
471474}
472475
473- /// This class parses JSON strings and builds the corresponding objects.
476+ /// This class parses JSON strings and builds the corresponding value.
477+ ///
478+ /// A JSON input must be the JSON encoding of a single JSON value,
479+ /// which can be a list or map containing other values.
480+ ///
481+ /// When used as a [StreamTransformer] , the input stream may emit
482+ /// multiple strings. The concatenation of all of these strings must
483+ /// be a valid JSON encoding of a single JSON value.
474484class JsonDecoder extends Converter <String , Object > {
475485 final Function (Object key, Object value) _reviver;
476486
Original file line number Diff line number Diff line change @@ -668,7 +668,7 @@ abstract class Stream<T> {
668668 }
669669
670670 /**
671- * Applies [streamTransformer] to this stream.
671+ * Applies [streamTransformer] to this stream.
672672 *
673673 * Returns the transformed stream,
674674 * that is, the result of `streamTransformer.bind(this)` .
Original file line number Diff line number Diff line change @@ -473,6 +473,13 @@ class _JsonUtf8EncoderSink extends ChunkedConversionSink<Object?> {
473473}
474474
475475/// This class parses JSON strings and builds the corresponding objects.
476+ ///
477+ /// A JSON input must be the JSON encoding of a single JSON value,
478+ /// which can be a list or map containing other values.
479+ ///
480+ /// When used as a [StreamTransformer] , the input stream may emit
481+ /// multiple strings. The concatenation of all of these strings must
482+ /// be a valid JSON encoding of a single JSON value.
476483class JsonDecoder extends Converter <String , Object ?> {
477484 final Object ? Function (Object ? key, Object ? value)? _reviver;
478485
You can’t perform that action at this time.
0 commit comments