Dart SDK
dart:convert
JsonCodec
class
JsonCodec
Properties
Constructors
Methods
Properties
encoder
decoder
inverted
inverted
Constructors
JsonCodec
withReviver
Methods
decode
encode
fuse
fuse
A
JsonCodec
encodes JSON objects to strings and decodes strings to JSON objects.
Extends
Object
Codec
<
Object
,
String
>
JsonCodec
Properties
JsonEncoder
encoder
read-only
JsonDecoder
decoder
read-only
Codec
<
String
,
Object
>
inverted
read-only ,
inherited
Inverts this.
Codec
<
String
,
Object
>
inverted
read-only ,
inherited
Inverts this.
Constructors
JsonCodec
({
dynamic
reviver
(
key
,
value
)
,
dynamic
toEncodable
(
object
)
})
const
Creates a JsonCodec with the given reviver and encoding function.
JsonCodec.withReviver
(
dynamic
reviver
(
key
,
value
)
)
Creates a JsonCodec with the given reviver.
Methods
decode
(
String
source
, {
dynamic
reviver
(
key
,
value
)
}) →
dynamic
Parses the string and returns the resulting Json object.
encode
(
Object
value
, {
dynamic
toEncodable
(
object
)
}) →
String
Converts value to a JSON string.
fuse
(
Codec
<
String
>
other
) →
Codec
<
Object
>
inherited
Fuses this with other.
fuse
(
Codec
<
String
>
other
) →
Codec
<
Object
>
inherited
Fuses this with other.