json_convert_content.dart 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. // ignore_for_file: non_constant_identifier_names
  2. // ignore_for_file: camel_case_types
  3. // ignore_for_file: prefer_single_quotes
  4. // This file is automatically generated. DO NOT EDIT, all your changes would be lost.
  5. import 'package:flutter/material.dart' show debugPrint;
  6. import 'package:domain/entity/auth_login_entity.dart';
  7. import 'package:domain/entity/captcha_img_entity.dart';
  8. import 'package:domain/entity/facility_book_entity.dart';
  9. import 'package:domain/entity/facility_page_entity.dart';
  10. import 'package:domain/entity/feedback_detail_entity.dart';
  11. import 'package:domain/entity/feedback_list_entity.dart';
  12. import 'package:domain/entity/form_content_entity.dart';
  13. import 'package:domain/entity/form_detail_entity.dart';
  14. import 'package:domain/entity/form_list_entity.dart';
  15. import 'package:domain/entity/form_option_entity.dart';
  16. import 'package:domain/entity/form_submitted_entity.dart';
  17. import 'package:domain/entity/form_submitted_page_entity.dart';
  18. import 'package:domain/entity/garage_sale_rent_detail_entity.dart';
  19. import 'package:domain/entity/garage_sale_rent_entity.dart';
  20. import 'package:domain/entity/id_name_entity.dart';
  21. import 'package:domain/entity/myfollowing_list_entity.dart';
  22. import 'package:domain/entity/myposts_sale_rent_entity.dart';
  23. import 'package:domain/entity/newsfeed_comment_publish_entity.dart';
  24. import 'package:domain/entity/newsfeed_detail_entity.dart';
  25. import 'package:domain/entity/newsfeed_following_entity.dart';
  26. import 'package:domain/entity/newsfeed_foryou_entity.dart';
  27. import 'package:domain/entity/newsfeed_news_entity.dart';
  28. import 'package:domain/entity/property_news_entity.dart';
  29. import 'package:domain/entity/property_sale_rent_entity.dart';
  30. import 'package:domain/entity/server_time.dart';
  31. import 'package:domain/entity/user_me_entity.dart';
  32. JsonConvert jsonConvert = JsonConvert();
  33. typedef JsonConvertFunction<T> = T Function(Map<String, dynamic> json);
  34. typedef EnumConvertFunction<T> = T Function(String value);
  35. typedef ConvertExceptionHandler = void Function(Object error, StackTrace stackTrace);
  36. extension MapSafeExt<K, V> on Map<K, V> {
  37. T? getOrNull<T>(K? key) {
  38. if (!containsKey(key) || key == null) {
  39. return null;
  40. } else {
  41. return this[key] as T?;
  42. }
  43. }
  44. }
  45. class JsonConvert {
  46. static ConvertExceptionHandler? onError;
  47. JsonConvertClassCollection convertFuncMap = JsonConvertClassCollection();
  48. /// When you are in the development, to generate a new model class, hot-reload doesn't find new generation model class, you can build on MaterialApp method called jsonConvert. ReassembleConvertFuncMap (); This method only works in a development environment
  49. /// https://flutter.cn/docs/development/tools/hot-reload
  50. /// class MyApp extends StatelessWidget {
  51. /// const MyApp({Key? key})
  52. /// : super(key: key);
  53. ///
  54. /// @override
  55. /// Widget build(BuildContext context) {
  56. /// jsonConvert.reassembleConvertFuncMap();
  57. /// return MaterialApp();
  58. /// }
  59. /// }
  60. void reassembleConvertFuncMap() {
  61. bool isReleaseMode = const bool.fromEnvironment('dart.vm.product');
  62. if (!isReleaseMode) {
  63. convertFuncMap = JsonConvertClassCollection();
  64. }
  65. }
  66. T? convert<T>(dynamic value, {EnumConvertFunction? enumConvert}) {
  67. if (value == null) {
  68. return null;
  69. }
  70. if (value is T) {
  71. return value;
  72. }
  73. try {
  74. return _asT<T>(value, enumConvert: enumConvert);
  75. } catch (e, stackTrace) {
  76. debugPrint('asT<$T> $e $stackTrace');
  77. if (onError != null) {
  78. onError!(e, stackTrace);
  79. }
  80. return null;
  81. }
  82. }
  83. List<T?>? convertList<T>(List<dynamic>? value,
  84. {EnumConvertFunction? enumConvert}) {
  85. if (value == null) {
  86. return null;
  87. }
  88. try {
  89. return value.map((dynamic e) => _asT<T>(e, enumConvert: enumConvert))
  90. .toList();
  91. } catch (e, stackTrace) {
  92. debugPrint('asT<$T> $e $stackTrace');
  93. if (onError != null) {
  94. onError!(e, stackTrace);
  95. }
  96. return <T>[];
  97. }
  98. }
  99. List<T>? convertListNotNull<T>(dynamic value,
  100. {EnumConvertFunction? enumConvert}) {
  101. if (value == null) {
  102. return null;
  103. }
  104. try {
  105. return (value as List<dynamic>).map((dynamic e) =>
  106. _asT<T>(e, enumConvert: enumConvert)!).toList();
  107. } catch (e, stackTrace) {
  108. debugPrint('asT<$T> $e $stackTrace');
  109. if (onError != null) {
  110. onError!(e, stackTrace);
  111. }
  112. return <T>[];
  113. }
  114. }
  115. T? _asT<T extends Object?>(dynamic value,
  116. {EnumConvertFunction? enumConvert}) {
  117. final String type = T.toString();
  118. final String valueS = value.toString();
  119. if (enumConvert != null) {
  120. return enumConvert(valueS) as T;
  121. } else if (type == "String") {
  122. return valueS as T;
  123. } else if (type == "int") {
  124. final int? intValue = int.tryParse(valueS);
  125. if (intValue == null) {
  126. return double.tryParse(valueS)?.toInt() as T?;
  127. } else {
  128. return intValue as T;
  129. }
  130. } else if (type == "double") {
  131. return double.parse(valueS) as T;
  132. } else if (type == "DateTime") {
  133. return DateTime.parse(valueS) as T;
  134. } else if (type == "bool") {
  135. if (valueS == '0' || valueS == '1') {
  136. return (valueS == '1') as T;
  137. }
  138. return (valueS == 'true') as T;
  139. } else if (type == "Map" || type.startsWith("Map<")) {
  140. return value as T;
  141. } else {
  142. if (convertFuncMap.containsKey(type)) {
  143. if (value == null) {
  144. return null;
  145. }
  146. var covertFunc = convertFuncMap[type]!;
  147. if (covertFunc is Map<String, dynamic>) {
  148. return covertFunc(value as Map<String, dynamic>) as T;
  149. } else {
  150. return covertFunc(Map<String, dynamic>.from(value)) as T;
  151. }
  152. } else {
  153. throw UnimplementedError(
  154. '$type unimplemented,you can try running the app again');
  155. }
  156. }
  157. }
  158. //list is returned by type
  159. static M? _getListChildType<M>(List<Map<String, dynamic>> data) {
  160. if (<AuthLoginEntity>[] is M) {
  161. return data.map<AuthLoginEntity>((Map<String, dynamic> e) =>
  162. AuthLoginEntity.fromJson(e)).toList() as M;
  163. }
  164. if (<CaptchaImgEntity>[] is M) {
  165. return data.map<CaptchaImgEntity>((Map<String, dynamic> e) =>
  166. CaptchaImgEntity.fromJson(e)).toList() as M;
  167. }
  168. if (<FacilityBookEntity>[] is M) {
  169. return data.map<FacilityBookEntity>((Map<String, dynamic> e) => FacilityBookEntity.fromJson(e)).toList() as M;
  170. }
  171. if (<FacilityBookFacilityType>[] is M) {
  172. return data.map<FacilityBookFacilityType>((Map<String, dynamic> e) => FacilityBookFacilityType.fromJson(e)).toList() as M;
  173. }
  174. if (<FacilityBookFacilities>[] is M) {
  175. return data.map<FacilityBookFacilities>((Map<String, dynamic> e) => FacilityBookFacilities.fromJson(e)).toList() as M;
  176. }
  177. if (<FacilityBookFacilitiesPeriods>[] is M) {
  178. return data.map<FacilityBookFacilitiesPeriods>((Map<String, dynamic> e) => FacilityBookFacilitiesPeriods.fromJson(e)).toList() as M;
  179. }
  180. if (<FacilityPageEntity>[] is M) {
  181. return data.map<FacilityPageEntity>((Map<String, dynamic> e) => FacilityPageEntity.fromJson(e)).toList() as M;
  182. }
  183. if (<FacilityPageList>[] is M) {
  184. return data.map<FacilityPageList>((Map<String, dynamic> e) => FacilityPageList.fromJson(e)).toList() as M;
  185. }
  186. if (<FacilityPageListBooking>[] is M) {
  187. return data.map<FacilityPageListBooking>((Map<String, dynamic> e) => FacilityPageListBooking.fromJson(e)).toList() as M;
  188. }
  189. if (<FacilityPageListFacility>[] is M) {
  190. return data.map<FacilityPageListFacility>((Map<String, dynamic> e) => FacilityPageListFacility.fromJson(e)).toList() as M;
  191. }
  192. if (<FacilityPageListFacilityType>[] is M) {
  193. return data.map<FacilityPageListFacilityType>((Map<String, dynamic> e) => FacilityPageListFacilityType.fromJson(e)).toList() as M;
  194. }
  195. if (<FacilityPageListTimePeriod>[] is M) {
  196. return data.map<FacilityPageListTimePeriod>((Map<String, dynamic> e) => FacilityPageListTimePeriod.fromJson(e)).toList() as M;
  197. }
  198. if (<FacilityPageListAccount>[] is M) {
  199. return data.map<FacilityPageListAccount>((Map<String, dynamic> e) => FacilityPageListAccount.fromJson(e)).toList() as M;
  200. }
  201. if (<FeedbackDetailEntity>[] is M) {
  202. return data.map<FeedbackDetailEntity>((Map<String, dynamic> e) =>
  203. FeedbackDetailEntity.fromJson(e)).toList() as M;
  204. }
  205. if (<FeedbackDetailReplies>[] is M) {
  206. return data.map<FeedbackDetailReplies>((Map<String, dynamic> e) =>
  207. FeedbackDetailReplies.fromJson(e)).toList() as M;
  208. }
  209. if (<FeedbackListEntity>[] is M) {
  210. return data.map<FeedbackListEntity>((Map<String, dynamic> e) =>
  211. FeedbackListEntity.fromJson(e)).toList() as M;
  212. }
  213. if (<FeedbackItemEntity>[] is M) {
  214. return data.map<FeedbackItemEntity>((Map<String, dynamic> e) =>
  215. FeedbackItemEntity.fromJson(e)).toList() as M;
  216. }
  217. if (<FormContentEntity>[] is M) {
  218. return data.map<FormContentEntity>((Map<String, dynamic> e) =>
  219. FormContentEntity.fromJson(e)).toList() as M;
  220. }
  221. if (<FormDetailEntity>[] is M) {
  222. return data.map<FormDetailEntity>((Map<String, dynamic> e) =>
  223. FormDetailEntity.fromJson(e)).toList() as M;
  224. }
  225. if (<FormListEntity>[] is M) {
  226. return data.map<FormListEntity>((Map<String, dynamic> e) =>
  227. FormListEntity.fromJson(e)).toList() as M;
  228. }
  229. if (<FormOptionEntity>[] is M) {
  230. return data.map<FormOptionEntity>((Map<String, dynamic> e) =>
  231. FormOptionEntity.fromJson(e)).toList() as M;
  232. }
  233. if (<FormSubmittedEntity>[] is M) {
  234. return data.map<FormSubmittedEntity>((Map<String, dynamic> e) =>
  235. FormSubmittedEntity.fromJson(e)).toList() as M;
  236. }
  237. if (<FormSubmittedEstateOnlineForm>[] is M) {
  238. return data.map<FormSubmittedEstateOnlineForm>((Map<String, dynamic> e) =>
  239. FormSubmittedEstateOnlineForm.fromJson(e)).toList() as M;
  240. }
  241. if (<FormSubmittedPageEntity>[] is M) {
  242. return data.map<FormSubmittedPageEntity>((Map<String, dynamic> e) =>
  243. FormSubmittedPageEntity.fromJson(e)).toList() as M;
  244. }
  245. if (<GarageSaleRentDetailEntity>[] is M) {
  246. return data.map<GarageSaleRentDetailEntity>((Map<String, dynamic> e) =>
  247. GarageSaleRentDetailEntity.fromJson(e)).toList() as M;
  248. }
  249. if (<GarageSaleRentDetailAccount>[] is M) {
  250. return data.map<GarageSaleRentDetailAccount>((Map<String, dynamic> e) =>
  251. GarageSaleRentDetailAccount.fromJson(e)).toList() as M;
  252. }
  253. if (<GarageSaleRentEntity>[] is M) {
  254. return data.map<GarageSaleRentEntity>((Map<String, dynamic> e) =>
  255. GarageSaleRentEntity.fromJson(e)).toList() as M;
  256. }
  257. if (<GarageSaleRentAccount>[] is M) {
  258. return data.map<GarageSaleRentAccount>((Map<String, dynamic> e) =>
  259. GarageSaleRentAccount.fromJson(e)).toList() as M;
  260. }
  261. if (<IdNameEntity>[] is M) {
  262. return data.map<IdNameEntity>((Map<String, dynamic> e) =>
  263. IdNameEntity.fromJson(e)).toList() as M;
  264. }
  265. if (<MyfollowingListEntity>[] is M) {
  266. return data.map<MyfollowingListEntity>((Map<String, dynamic> e) =>
  267. MyfollowingListEntity.fromJson(e)).toList() as M;
  268. }
  269. if (<MypostsSaleRentEntity>[] is M) {
  270. return data.map<MypostsSaleRentEntity>((Map<String, dynamic> e) =>
  271. MypostsSaleRentEntity.fromJson(e)).toList() as M;
  272. }
  273. if (<NewsfeedCommentPublishEntity>[] is M) {
  274. return data.map<NewsfeedCommentPublishEntity>((Map<String, dynamic> e) =>
  275. NewsfeedCommentPublishEntity.fromJson(e)).toList() as M;
  276. }
  277. if (<NewsfeedDetailEntity>[] is M) {
  278. return data.map<NewsfeedDetailEntity>((Map<String, dynamic> e) =>
  279. NewsfeedDetailEntity.fromJson(e)).toList() as M;
  280. }
  281. if (<NewsfeedDetailAccount>[] is M) {
  282. return data.map<NewsfeedDetailAccount>((Map<String, dynamic> e) =>
  283. NewsfeedDetailAccount.fromJson(e)).toList() as M;
  284. }
  285. if (<NewsfeedDetailComments>[] is M) {
  286. return data.map<NewsfeedDetailComments>((Map<String, dynamic> e) =>
  287. NewsfeedDetailComments.fromJson(e)).toList() as M;
  288. }
  289. if (<NewsfeedDetailCommentsAccount>[] is M) {
  290. return data.map<NewsfeedDetailCommentsAccount>((Map<String, dynamic> e) =>
  291. NewsfeedDetailCommentsAccount.fromJson(e)).toList() as M;
  292. }
  293. if (<NewsfeedDetailCommentsToAccount>[] is M) {
  294. return data.map<NewsfeedDetailCommentsToAccount>((
  295. Map<String, dynamic> e) =>
  296. NewsfeedDetailCommentsToAccount.fromJson(e)).toList() as M;
  297. }
  298. if (<NewsfeedFollowingEntity>[] is M) {
  299. return data.map<NewsfeedFollowingEntity>((Map<String, dynamic> e) =>
  300. NewsfeedFollowingEntity.fromJson(e)).toList() as M;
  301. }
  302. if (<NewsfeedFollowingList>[] is M) {
  303. return data.map<NewsfeedFollowingList>((Map<String, dynamic> e) =>
  304. NewsfeedFollowingList.fromJson(e)).toList() as M;
  305. }
  306. if (<NewsfeedFollowingListAccount>[] is M) {
  307. return data.map<NewsfeedFollowingListAccount>((Map<String, dynamic> e) =>
  308. NewsfeedFollowingListAccount.fromJson(e)).toList() as M;
  309. }
  310. if (<NewsfeedForyouEntity>[] is M) {
  311. return data.map<NewsfeedForyouEntity>((Map<String, dynamic> e) =>
  312. NewsfeedForyouEntity.fromJson(e)).toList() as M;
  313. }
  314. if (<NewsfeedForyouList>[] is M) {
  315. return data.map<NewsfeedForyouList>((Map<String, dynamic> e) =>
  316. NewsfeedForyouList.fromJson(e)).toList() as M;
  317. }
  318. if (<NewsfeedForyouListAccount>[] is M) {
  319. return data.map<NewsfeedForyouListAccount>((Map<String, dynamic> e) =>
  320. NewsfeedForyouListAccount.fromJson(e)).toList() as M;
  321. }
  322. if (<NewsfeedNewsEntity>[] is M) {
  323. return data.map<NewsfeedNewsEntity>((Map<String, dynamic> e) =>
  324. NewsfeedNewsEntity.fromJson(e)).toList() as M;
  325. }
  326. if (<NewsfeedNewsList>[] is M) {
  327. return data.map<NewsfeedNewsList>((Map<String, dynamic> e) =>
  328. NewsfeedNewsList.fromJson(e)).toList() as M;
  329. }
  330. if (<NewsfeedNewsListAccount>[] is M) {
  331. return data.map<NewsfeedNewsListAccount>((Map<String, dynamic> e) =>
  332. NewsfeedNewsListAccount.fromJson(e)).toList() as M;
  333. }
  334. if (<PropertyNewsEntity>[] is M) {
  335. return data.map<PropertyNewsEntity>((Map<String, dynamic> e) =>
  336. PropertyNewsEntity.fromJson(e)).toList() as M;
  337. }
  338. if (<PropertyNewsList>[] is M) {
  339. return data.map<PropertyNewsList>((Map<String, dynamic> e) =>
  340. PropertyNewsList.fromJson(e)).toList() as M;
  341. }
  342. if (<PropertySaleRentEntity>[] is M) {
  343. return data.map<PropertySaleRentEntity>((Map<String, dynamic> e) =>
  344. PropertySaleRentEntity.fromJson(e)).toList() as M;
  345. }
  346. if (<PropertySaleRentList>[] is M) {
  347. return data.map<PropertySaleRentList>((Map<String, dynamic> e) =>
  348. PropertySaleRentList.fromJson(e)).toList() as M;
  349. }
  350. if (<ServerTime>[] is M) {
  351. return data.map<ServerTime>((Map<String, dynamic> e) =>
  352. ServerTime.fromJson(e)).toList() as M;
  353. }
  354. if (<UserMeEntity>[] is M) {
  355. return data.map<UserMeEntity>((Map<String, dynamic> e) =>
  356. UserMeEntity.fromJson(e)).toList() as M;
  357. }
  358. if (<UserMeHouseholds>[] is M) {
  359. return data.map<UserMeHouseholds>((Map<String, dynamic> e) =>
  360. UserMeHouseholds.fromJson(e)).toList() as M;
  361. }
  362. if (<UserMeEstates>[] is M) {
  363. return data.map<UserMeEstates>((Map<String, dynamic> e) =>
  364. UserMeEstates.fromJson(e)).toList() as M;
  365. }
  366. if (<UserMeEstatesAccounts>[] is M) {
  367. return data.map<UserMeEstatesAccounts>((Map<String, dynamic> e) =>
  368. UserMeEstatesAccounts.fromJson(e)).toList() as M;
  369. }
  370. if (<UserMeEstatesAccountsUnit>[] is M) {
  371. return data.map<UserMeEstatesAccountsUnit>((Map<String, dynamic> e) =>
  372. UserMeEstatesAccountsUnit.fromJson(e)).toList() as M;
  373. }
  374. if (<UserMeDefaultUnit>[] is M) {
  375. return data.map<UserMeDefaultUnit>((Map<String, dynamic> e) =>
  376. UserMeDefaultUnit.fromJson(e)).toList() as M;
  377. }
  378. if (<UserMeInformation>[] is M) {
  379. return data.map<UserMeInformation>((Map<String, dynamic> e) =>
  380. UserMeInformation.fromJson(e)).toList() as M;
  381. }
  382. debugPrint("$M not found");
  383. return null;
  384. }
  385. static M? fromJsonAsT<M>(dynamic json) {
  386. if (json is M) {
  387. return json;
  388. }
  389. if (json is List) {
  390. return _getListChildType<M>(
  391. json.map((dynamic e) => e as Map<String, dynamic>).toList());
  392. } else {
  393. return jsonConvert.convert<M>(json);
  394. }
  395. }
  396. }
  397. class JsonConvertClassCollection {
  398. Map<String, JsonConvertFunction> convertFuncMap = {
  399. (AuthLoginEntity).toString(): AuthLoginEntity.fromJson,
  400. (CaptchaImgEntity).toString(): CaptchaImgEntity.fromJson,
  401. (FacilityBookEntity).toString(): FacilityBookEntity.fromJson,
  402. (FacilityBookFacilityType).toString(): FacilityBookFacilityType.fromJson,
  403. (FacilityBookFacilities).toString(): FacilityBookFacilities.fromJson,
  404. (FacilityBookFacilitiesPeriods).toString(): FacilityBookFacilitiesPeriods.fromJson,
  405. (FacilityPageEntity).toString(): FacilityPageEntity.fromJson,
  406. (FacilityPageList).toString(): FacilityPageList.fromJson,
  407. (FacilityPageListBooking).toString(): FacilityPageListBooking.fromJson,
  408. (FacilityPageListFacility).toString(): FacilityPageListFacility.fromJson,
  409. (FacilityPageListFacilityType).toString(): FacilityPageListFacilityType.fromJson,
  410. (FacilityPageListTimePeriod).toString(): FacilityPageListTimePeriod.fromJson,
  411. (FacilityPageListAccount).toString(): FacilityPageListAccount.fromJson,
  412. (FeedbackDetailEntity).toString(): FeedbackDetailEntity.fromJson,
  413. (FeedbackDetailReplies).toString(): FeedbackDetailReplies.fromJson,
  414. (FeedbackListEntity).toString(): FeedbackListEntity.fromJson,
  415. (FeedbackItemEntity).toString(): FeedbackItemEntity.fromJson,
  416. (FormContentEntity).toString(): FormContentEntity.fromJson,
  417. (FormDetailEntity).toString(): FormDetailEntity.fromJson,
  418. (FormListEntity).toString(): FormListEntity.fromJson,
  419. (FormOptionEntity).toString(): FormOptionEntity.fromJson,
  420. (FormSubmittedEntity).toString(): FormSubmittedEntity.fromJson,
  421. (FormSubmittedEstateOnlineForm).toString(): FormSubmittedEstateOnlineForm
  422. .fromJson,
  423. (FormSubmittedPageEntity).toString(): FormSubmittedPageEntity.fromJson,
  424. (GarageSaleRentDetailEntity).toString(): GarageSaleRentDetailEntity
  425. .fromJson,
  426. (GarageSaleRentDetailAccount).toString(): GarageSaleRentDetailAccount
  427. .fromJson,
  428. (GarageSaleRentEntity).toString(): GarageSaleRentEntity.fromJson,
  429. (GarageSaleRentAccount).toString(): GarageSaleRentAccount.fromJson,
  430. (IdNameEntity).toString(): IdNameEntity.fromJson,
  431. (MyfollowingListEntity).toString(): MyfollowingListEntity.fromJson,
  432. (MypostsSaleRentEntity).toString(): MypostsSaleRentEntity.fromJson,
  433. (NewsfeedCommentPublishEntity).toString(): NewsfeedCommentPublishEntity
  434. .fromJson,
  435. (NewsfeedDetailEntity).toString(): NewsfeedDetailEntity.fromJson,
  436. (NewsfeedDetailAccount).toString(): NewsfeedDetailAccount.fromJson,
  437. (NewsfeedDetailComments).toString(): NewsfeedDetailComments.fromJson,
  438. (NewsfeedDetailCommentsAccount).toString(): NewsfeedDetailCommentsAccount
  439. .fromJson,
  440. (NewsfeedDetailCommentsToAccount)
  441. .toString(): NewsfeedDetailCommentsToAccount.fromJson,
  442. (NewsfeedFollowingEntity).toString(): NewsfeedFollowingEntity.fromJson,
  443. (NewsfeedFollowingList).toString(): NewsfeedFollowingList.fromJson,
  444. (NewsfeedFollowingListAccount).toString(): NewsfeedFollowingListAccount
  445. .fromJson,
  446. (NewsfeedForyouEntity).toString(): NewsfeedForyouEntity.fromJson,
  447. (NewsfeedForyouList).toString(): NewsfeedForyouList.fromJson,
  448. (NewsfeedForyouListAccount).toString(): NewsfeedForyouListAccount.fromJson,
  449. (NewsfeedNewsEntity).toString(): NewsfeedNewsEntity.fromJson,
  450. (NewsfeedNewsList).toString(): NewsfeedNewsList.fromJson,
  451. (NewsfeedNewsListAccount).toString(): NewsfeedNewsListAccount.fromJson,
  452. (PropertyNewsEntity).toString(): PropertyNewsEntity.fromJson,
  453. (PropertyNewsList).toString(): PropertyNewsList.fromJson,
  454. (PropertySaleRentEntity).toString(): PropertySaleRentEntity.fromJson,
  455. (PropertySaleRentList).toString(): PropertySaleRentList.fromJson,
  456. (ServerTime).toString(): ServerTime.fromJson,
  457. (UserMeEntity).toString(): UserMeEntity.fromJson,
  458. (UserMeHouseholds).toString(): UserMeHouseholds.fromJson,
  459. (UserMeEstates).toString(): UserMeEstates.fromJson,
  460. (UserMeEstatesAccounts).toString(): UserMeEstatesAccounts.fromJson,
  461. (UserMeEstatesAccountsUnit).toString(): UserMeEstatesAccountsUnit.fromJson,
  462. (UserMeDefaultUnit).toString(): UserMeDefaultUnit.fromJson,
  463. (UserMeInformation).toString(): UserMeInformation.fromJson,
  464. };
  465. bool containsKey(String type) {
  466. return convertFuncMap.containsKey(type);
  467. }
  468. JsonConvertFunction? operator [](String key) {
  469. return convertFuncMap[key];
  470. }
  471. }