ElJsonUtil class

此工具类用于代码生成(fromJson),直接访问 Map 对象很容易出现低级类型转换错误, 例如:int is not String.

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

$bool(dynamic json, String key) bool?
$custom<T>(dynamic json, String key, ElSerialize<T> model) → T?
当内置的数据转换不满足目标类型时,将统一进入自定义序列化方法, 如果用户没有提供自定义序列化,那么程序将抛出异常
$double(dynamic json, String key) double?
$int(dynamic json, String key) int?
$list<T>(dynamic json, String key) List<T>?
$map<T>(dynamic json, String key) Map<String, T>?
$model<T>(dynamic json, String key, T model) → T?
$num(dynamic json, String key) num?
$set<T>(dynamic json, String key) Set<T>?
$string(dynamic json, String key) String?
eqList(List? value1, List? value2) bool
eqMap(Map? value1, Map? value2) bool
eqSet(Set? value1, Set? value2) bool