JsonUtils class

json 格式转化工具类

Constructors

JsonUtils()

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

encodeObj(dynamic value) String?
将对象转换为JSON字符串 Converts object value to a JSON string.
getList<T>(dynamic source) List<T>?
get List
getObj<T>(String? source, T f(Map v)) → T?
转换JSON字符串到对象 Converts JSON string source to object.
getObject<T>(dynamic source, T f(Map v)) → T?
转换JSON字符串或JSON映射到对象 Converts JSON string or JSON map source to object.
getObjectList<T>(dynamic source, T f(Map v)) List<T>?
转换JSON字符串或JSON映射列表到对象列表 Converts JSON string or JSON map list source to object list.
getObjList<T>(String? source, T f(Map v)) List<T>?
转换JSON字符串列表到对象列表 Converts JSON string list source to object list.
printJson(Object object) → void
单纯的Json格式输出打印
printJsonEncode(Object object) → void
单纯的Json格式输出打印