JsonSortedEncoder class
This class sorts map keys before converting JSON objects to strings.
For more information, see JsonEncoder.
- Inheritance
-
- Object
- Converter<
Object?, String> - JsonEncoder
- JsonSortedEncoder
Constructors
- JsonSortedEncoder([Object? toEncodable(dynamic object)?])
-
Creates a JSON encoder where all maps are sorted.
const
- JsonSortedEncoder.withIndent(dynamic indent, [Object? toEncodable(dynamic object)?])
-
Creates a JSON encoder that creates multi-line JSON with sorted map keys.
const
Properties
Methods
-
bind(
Stream< Object?> stream) → Stream<String> -
Transforms the provided
stream
.inherited -
cast<
RS, RT> () → Converter< RS, RT> -
Provides a
Converter<RS, RT>
view of this stream transformer.inherited -
convert(
Object? object) → String -
Converts
object
to a JSON String where all map keys are sorted.override -
fuse<
T> (Converter< String, T> other) → Converter<Object?, T> -
Fuses
this
withother
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startChunkedConversion(
Sink< String> sink) → ChunkedConversionSink<Object?> -
Starts a chunked conversion.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited