JsonParserRegistry class

A ParserRegistry for JSON values.

Inheritance

Constructors

JsonParserRegistry()
Creates an empty registry with no registered parsers.
JsonParserRegistry.withKnownParsers()
Creates a registry pre-registered with the predefined parsers:

Properties

hashCode int
The hash code for this object.
no setterinherited
parserMap Map<Type, Parser<Object?, Json?>>
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addParser<T extends Object?>(Parser<T, Json?> parser) → void
Registers a parser for the type T.
inherited
getParser<T extends Object?>() Parser<T, Json?>?
Returns the parser for the type T, or null if no parser was registered the for type T.
inherited
getRuntimeParser(Type typeOfT) Parser<Object?, Json?>?
Returns the parser for the type typeOfT, or null if no parser was registered the for type typeOfT.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited