import 'package:bbyyy/beans/new_msg_bean_entity.dart'; newMsgBeanEntityFromJson(NewMsgBeanEntity data, Map json) { if (json['type'] != null) { data.type = json['type'].toString(); } if (json['content'] != null) { data.content = NewMsgBeanContent().fromJson(json['content']); } return data; } Map newMsgBeanEntityToJson(NewMsgBeanEntity entity) { final Map data = new Map(); data['type'] = entity.type; data['content'] = entity.content?.toJson(); return data; } newMsgBeanContentFromJson(NewMsgBeanContent data, Map json) { if (json['sender'] != null) { data.sender = NewMsgBeanContentSender().fromJson(json['sender']); } if (json['receiver'] != null) { data.receiver = NewMsgBeanContentReceiver().fromJson(json['receiver']); } if (json['content'] != null) { data.content = json['content'].toString(); } if (json['time'] != null) { data.time = json['time'].toString(); } if (json['type'] != null) { data.type = json['type'].toString(); } if (json['uuid'] != null) { data.uuid = json['uuid'].toString(); } if (json['shop'] != null) { data.shop = NewMsgBeanContentShop().fromJson(json['shop']); } if (json['order'] != null) { data.order = NewMsgBeanContentOrder().fromJson(json['order']); } if (json['goods'] != null) { data.goods = NewMsgBeanContentGoods().fromJson(json['goods']); } return data; } Map newMsgBeanContentToJson(NewMsgBeanContent entity) { final Map data = new Map(); data['sender'] = entity.sender?.toJson(); data['receiver'] = entity.receiver?.toJson(); data['content'] = entity.content; data['time'] = entity.time; data['type'] = entity.type; data['uuid'] = entity.uuid; data['shop'] = entity.shop?.toJson(); data['order'] = entity.order?.toJson(); data['goods'] = entity.goods?.toJson(); return data; } newMsgBeanContentSenderFromJson(NewMsgBeanContentSender data, Map json) { if (json['pic'] != null) { data.pic = json['pic'].toString(); } if (json['name'] != null) { data.name = json['name'].toString(); } if (json['id'] != null) { data.id = json['id'] is String ? int.tryParse(json['id']) : json['id'].toInt(); } if (json['uid'] != null) { data.uid = json['uid'] is String ? int.tryParse(json['uid']) : json['uid'].toInt(); } return data; } Map newMsgBeanContentSenderToJson(NewMsgBeanContentSender entity) { final Map data = new Map(); data['pic'] = entity.pic; data['name'] = entity.name; data['id'] = entity.id; data['uid'] = entity.uid; return data; } newMsgBeanContentReceiverFromJson(NewMsgBeanContentReceiver data, Map json) { if (json['pic'] != null) { data.pic = json['pic'].toString(); } if (json['name'] != null) { data.name = json['name'].toString(); } if (json['id'] != null) { data.id = json['id'] is String ? int.tryParse(json['id']) : json['id'].toInt(); } if (json['uid'] != null) { data.uid = json['uid'] is String ? int.tryParse(json['uid']) : json['uid'].toInt(); } return data; } Map newMsgBeanContentReceiverToJson(NewMsgBeanContentReceiver entity) { final Map data = new Map(); data['pic'] = entity.pic; data['name'] = entity.name; data['id'] = entity.id; data['uid'] = entity.uid; return data; } newMsgBeanContentShopFromJson(NewMsgBeanContentShop data, Map json) { return data; } Map newMsgBeanContentShopToJson(NewMsgBeanContentShop entity) { final Map data = new Map(); return data; } newMsgBeanContentOrderFromJson(NewMsgBeanContentOrder data, Map json) { return data; } Map newMsgBeanContentOrderToJson(NewMsgBeanContentOrder entity) { final Map data = new Map(); return data; } newMsgBeanContentGoodsFromJson(NewMsgBeanContentGoods data, Map json) { return data; } Map newMsgBeanContentGoodsToJson(NewMsgBeanContentGoods entity) { final Map data = new Map(); return data; }