JsonUtils class

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

fromJson(String data) Map<String, dynamic>
fromList(String data) List
getValue({String keyName = "", String json = "", bool isFillWhitespace = false}) String
从json字符串得到某个属性值 示例: JsonUtils.getValue("name",'{"name":"china","date":"2024"}') //输出china keyName 属性名 json json内容 isFillWhitespace 是否去除json字符串的空格或换行符
toJson(Object? obj) String
对象转json obj需要转换的对象