DJson class
JSON对象
- Available extensions
Constructors
- DJson.new(dynamic _value)
- 构造函数
- DJson.fromJsonStr(String jsonStr)
-
从json格式字符串初始化
factory
Properties
- boolOrFalse → bool
-
Available on DJson, provided by the ExDJson extension
获取bool值,类型匹配才有值,默认falseno setter - boolValue → bool?
-
Available on DJson, provided by the ExDJson extension
获取可选bool,类型匹配才有值no setter - doubleOrZero → double
-
Available on DJson, provided by the ExDJson extension
获取double值,类型匹配才有值,默认0no setter - doubleValue → double?
-
Available on DJson, provided by the ExDJson extension
获取可选double,类型匹配才有值no setter - forceToBool → bool?
-
Available on DJson, provided by the ExDJson extension
将值强制转为bool,包括(int,double,bool,string)no setter - forceToDouble → double?
-
Available on DJson, provided by the ExDJson extension
将值强制转为double,包括(int,double,bool,string)no setter - forceToInt → int?
-
Available on DJson, provided by the ExDJson extension
将值强制转为int,包括(int,double,bool,string)no setter - forceToNum → num?
-
Available on DJson, provided by the ExDJson extension
将值强制转为String,包括(int,double,bool,string)no setter - forceToString → String
-
Available on DJson, provided by the ExDJson extension
将值强制转为String, 包括(int,double,bool,List,Map)no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- intOrZero → int
-
Available on DJson, provided by the ExDJson extension
获取int值,类型匹配才有值,默认0no setter - intValue → int?
-
Available on DJson, provided by the ExDJson extension
获取可选int,类型匹配才有值no setter - listOrEmpty → List
-
Available on DJson, provided by the ExDJson extension
获取List, 类型匹配才有值no setter - listValue → List?
-
Available on DJson, provided by the ExDJson extension
获取可选List, 类型匹配才有值no setter - mapOrEmpty → Map
-
Available on DJson, provided by the ExDJson extension
获取Map, 类型匹配才有值no setter - mapValue → Map?
-
Available on DJson, provided by the ExDJson extension
获取可选Map, 类型匹配才有值no setter - numOrZero → num
-
Available on DJson, provided by the ExDJson extension
获取num值,类型匹配才有值,默认0no setter - numValue → num?
-
Available on DJson, provided by the ExDJson extension
获取可选num,类型匹配才有值no setter - rawValue → dynamic
-
Available on DJson, provided by the ExDJson extension
原始数据no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringOrEmpty → String
-
Available on DJson, provided by the ExDJson extension
获取String值,类型匹配才有值,默认''no setter - stringValue → String?
-
Available on DJson, provided by the ExDJson extension
获取可选String,类型匹配才有值no setter
Methods
-
boolOrDefValue(
bool defValue) → bool - 获取bool值,不存在时返回默认值
-
doubleOrDefValue(
double defValue) → double - 获取double值,不存在时返回默认值
-
intOrDefValue(
int defValue) → int - 获取int值,不存在时返回默认值
-
listOrDefValue(
List defValue) → List - 获取Map值,不存在时返回默认值
-
mapOrDefValue(
Map defValue) → Map - 获取Map值,不存在时返回默认值
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
numOrDefValue(
num defValue) → num - 获取num值,不存在时返回默认值
-
stringOrDefValue(
String defValue) → String - 获取String值,不存在时返回默认值
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
dynamic key) → DJson - 下标操作符