serializerJson method
此处做内省, 确定后台返回数据的格式
listkey
支持KeyPath 取值
eg. serializerJson(serializer,'data.list')
Implementation
void serializerJson(TransformJson serializer, {String? listKey}) {
if (data is Map) {
if (listKey != null && listKey.isNotEmpty) {
toListModel(serializer, (data as Map).getValue(listKey));
} else {
result = serializer(data);
}
} else {
toListModel(serializer, data);
}
}