toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['code'] = code;
data['desc'] = desc;
dynamic toJsonData = this.data;
if (this.data == null) {
data['data'] = this.data;
} else {
if (T == V2TimMessage) {
toJsonData = (this.data as V2TimMessage).toJson();
} else if (T == V2TimMessageListResult) {
toJsonData = (this.data as V2TimMessageListResult).toJson();
} else if (T == V2TimUserFullInfo) {
toJsonData = (this.data as V2TimUserFullInfo).toJson();
} else if (T == _getT<List<V2TimUserFullInfo>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimUserFullInfo).toJson())
.toList();
} else if (T == _getT<List<V2TimGroupInfo>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimGroupInfo).toJson())
.toList();
} else if (T == _getT<List<V2TimGroupInfoResult>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimGroupInfoResult).toJson())
.toList();
} else if (T == _getT<Map<String, String>>()) {
toJsonData = this.data as Map<String, String>;
} else if (T == _getT<Map<String, int>>()) {
toJsonData = this.data as Map<String, int>;
} else if (T == V2TimGroupMemberInfoResult) {
toJsonData = (this.data as V2TimGroupMemberInfoResult).toJson();
} else if (T == _getT<List<V2TimGroupMemberFullInfo>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimGroupMemberFullInfo).toJson())
.toList();
} else if (T == _getT<List<V2TimGroupMemberOperationResult>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimGroupMemberOperationResult).toJson())
.toList();
} else if (T == V2TimGroupApplicationResult) {
toJsonData = (this.data as V2TimGroupApplicationResult).toJson();
} else if (T == V2TimConversation) {
toJsonData = (this.data as V2TimConversation).toJson();
} else if (T == V2TimConversationResult) {
toJsonData = (this.data as V2TimConversationResult).toJson();
} else if (T == _getT<List<V2TimFriendInfo>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimFriendInfo).toJson())
.toList();
} else if (T == _getT<List<V2TimFriendInfoResult>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimFriendInfoResult).toJson())
.toList();
} else if (T == V2TimFriendOperationResult) {
toJsonData = (this.data as V2TimFriendOperationResult).toJson();
} else if (T == _getT<List<V2TimFriendOperationResult>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimFriendOperationResult).toJson())
.toList();
} else if (T == V2TimFriendCheckResult) {
toJsonData = (this.data as V2TimFriendCheckResult).toJson();
} else if (T == _getT<List<V2TimFriendCheckResult>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimFriendCheckResult).toJson())
.toList();
} else if (T == V2TimFriendApplicationResult) {
toJsonData = (this.data as V2TimFriendApplicationResult).toJson();
} else if (T == _getT<List<V2TimFriendGroup>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimFriendGroup).toJson())
.toList();
} else if (T == _getT<List<V2TimMessage>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimMessage).toJson())
.toList();
} else if (T == _getT<List<V2TimMessageExtensionResult>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimMessageExtensionResult).toJson())
.toList();
} else if (T == _getT<List<V2TimMessageExtension>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimMessageExtension).toJson())
.toList();
} else if (T == V2TimMessageSearchResult) {
toJsonData = (this.data as V2TimMessageSearchResult).toJson();
} else if (T == V2TimMessageOnlineUrl) {
toJsonData = (this.data as V2TimMessageOnlineUrl).toJson();
} else if (T == V2TimSignalingInfo) {
toJsonData = (this.data as V2TimSignalingInfo).toJson();
} else if (T == V2TimMsgCreateInfoResult) {
toJsonData = (this.data as V2TimMsgCreateInfoResult).toJson();
} else if (T == V2TimMessageChangeInfo) {
toJsonData = (this.data as V2TimMessageChangeInfo).toJson();
} else if (T == V2TimConversationOperationResult) {
toJsonData = (this.data as V2TimConversationOperationResult).toJson();
} else if (T == V2TimGroupMessageReadMemberList) {
toJsonData = (this.data as V2TimGroupMessageReadMemberList).toJson();
} else if (T == _getT<List<V2TimMessageReceipt>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimMessageReceipt).toJson())
.toList();
} else if (T == _getT<List<V2TimTopicInfoResult>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimTopicInfoResult).toJson())
.toList();
} else if (T == _getT<List<V2TimTopicOperationResult>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimTopicOperationResult).toJson())
.toList();
} else if (T == _getT<List<V2TimGroupInfo>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimGroupInfo).toJson())
.toList();
} else if (T == _getT<List<V2TimUserStatus>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimUserStatus).toJson())
.toList();
} else if (T == _getT<List<V2TimConversationOperationResult>>()) {
toJsonData = (this.data as List)
.map((e) => (e as V2TimConversationOperationResult).toJson())
.toList();
} else {
toJsonData = this.data;
}
data['data'] = toJsonData;
}
return data;
}