JsonToBytesEncoder class
JSON to Bytes Encoder
An encoder that converts JSON objects
to byte data
.
const encoder = JsonToBytesEncoder();
final jsonData = { 'a': 0 };
final byteData = encoder.convert(jsonData);
print(byteData); // [123, 34, 97, 34, 58, 48, 125]
Constructors
- JsonToBytesEncoder.new()
-
Creates an encoder to convert JSON objects to byte data.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bind(
Stream< Object> stream) → Stream<List< int> > -
Transforms the provided
stream
.inherited -
cast<
RS, RT> () → Converter< RS, RT> -
Provides a
Converter<RS, RT>
view of this stream transformer.inherited -
convert(
Object input) → List< int> -
Converts
input
and returns the result of the conversion.override -
fuse<
TT> (Converter< List< other) → Converter<int> , TT>Object, TT> -
Fuses
this
withother
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startChunkedConversion(
Sink< List< sink) → Sink<int> >Object> -
Starts a chunked conversion.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited