JsonDecoder class

This class parses JSON strings and builds the corresponding objects.

A JSON input must be the JSON encoding of a single JSON value, which can be a list or map containing other values.

When used as a StreamTransformer, the input stream may emit multiple strings. The concatenation of all of these strings must be a valid JSON encoding of a single JSON value.

Inheritance

Constructors

JsonDecoder([Object? reviver(Object? key, Object? value)])
const
Constructs a new JsonDecoder. [...]

Properties

hashCodeint
read-only, inherited
The hash code for this object. [...]
runtimeTypeType
read-only, inherited
A representation of the runtime type of the object.

Methods

bind(Stream<String> stream) → Stream<Object?>
override
Transforms the provided stream. [...]
cast<RS, RT>() → Converter<RS, RT>
inherited
Provides a Converter<RS, RT> view of this stream transformer. [...]
convert(String input) → dynamic
override
Converts the given JSON-string input to its corresponding object. [...]
fuse<TT>(Converter<Object?, TT> other) → Converter<String, TT>
inherited
Fuses this with other. [...]
noSuchMethod(Invocation invocation) → dynamic
inherited
Invoked when a non-existent method or property is accessed. [...]
startChunkedConversion(Sink<Object?> sink) → StringConversionSink
override
Starts a conversion from a chunked JSON string to its corresponding object. [...]
toString() → String
inherited
A string representation of this object. [...]

Operators

operator ==(Object other) → bool
inherited
The equality operator. [...]

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.13.0/dart-convert/JsonDecoder-class.html