JsonSortedEncoder class

This class sorts map keys before converting JSON objects to strings.

For more information, see JsonEncoder.

Inheritance

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

hashCode int
The hash code for this object.
no setterinherited
indent String?
The string used for indention.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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 with other.
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