BoolDecoder class

bool类型处理中间件 用法: @JsonKey(fromJson:StringDecoder.decodeOrNull) bool? isAllDay

Inheritance

Constructors

BoolDecoder.new()

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

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

Static Methods

decodeOrDefault(dynamic value) bool
策略2 异常情况解析默认值,比@JsonKey(defaultValue: false)更健壮
decodeOrException(dynamic value) bool
策略3 尝试解析异常情况报错并给出错误值
decodeOrNull(dynamic json) bool?
策略1 异常情况解析为空