// GENERATED CODE - DO NOT MODIFY BY HAND part of 'kitchen_sink.dart'; // ************************************************************************** // JsonSerializableGenerator // ************************************************************************** KitchenSink _$KitchenSinkFromJson(Map json) { return KitchenSink( ctorValidatedNo42: json['no-42'] as int, iterable: json['iterable'] as List, dynamicIterable: json['dynamicIterable'] as List, objectIterable: json['objectIterable'] as List, intIterable: (json['intIterable'] as List)?.map((e) => e as int), dateTimeIterable: (json['datetime-iterable'] as List) ?.map((e) => e == null ? null : DateTime.parse(e as String))) ..dateTime = json['dateTime'] == null ? null : DateTime.parse(json['dateTime'] as String) ..set = (json['set'] as List)?.map((e) => e)?.toSet() ..dynamicSet = (json['dynamicSet'] as List)?.map((e) => e)?.toSet() ..objectSet = (json['objectSet'] as List)?.map((e) => e)?.toSet() ..intSet = (json['intSet'] as List)?.map((e) => e as int)?.toSet() ..dateTimeSet = (json['dateTimeSet'] as List) ?.map((e) => e == null ? null : DateTime.parse(e as String)) ?.toSet() ..list = json['list'] as List ..dynamicList = json['dynamicList'] as List ..objectList = json['objectList'] as List ..intList = (json['intList'] as List)?.map((e) => e as int)?.toList() ..dateTimeList = (json['dateTimeList'] as List) ?.map((e) => e == null ? null : DateTime.parse(e as String)) ?.toList() ..map = json['map'] as Map ..stringStringMap = (json['stringStringMap'] as Map) ?.map((k, e) => MapEntry(k as String, e as String)) ..dynamicIntMap = (json['dynamicIntMap'] as Map)?.map((k, e) => MapEntry(k, e as int)) ..objectDateTimeMap = (json['objectDateTimeMap'] as Map)?.map( (k, e) => MapEntry(k, e == null ? null : DateTime.parse(e as String))) ..crazyComplex = (json['crazyComplex'] as List) ?.map((e) => (e as Map)?.map((k, e) => MapEntry( k as String, (e as Map)?.map((k, e) => MapEntry(k as String, (e as List)?.map((e) => (e as List)?.map((e) => e == null ? null : DateTime.parse(e as String))?.toList())?.toList()))))) ?.toList() ..val = (json['val'] as Map)?.map((k, e) => MapEntry(k as String, e as bool)) ..writeNotNull = json['writeNotNull'] as bool ..string = json[r'$string'] as String ..simpleObject = json['simpleObject'] == null ? null : SimpleObject.fromJson(json['simpleObject'] as Map) ..strictKeysObject = json['strictKeysObject'] == null ? null : StrictKeysObject.fromJson(json['strictKeysObject'] as Map) ..validatedPropertyNo42 = json['validatedPropertyNo42'] as int; } abstract class _$KitchenSinkSerializerMixin { int get ctorValidatedNo42; DateTime get dateTime; Iterable get iterable; Iterable get dynamicIterable; Iterable get objectIterable; Iterable get intIterable; Set get set; Set get dynamicSet; Set get objectSet; Set get intSet; Set get dateTimeSet; Iterable get dateTimeIterable; List get list; List get dynamicList; List get objectList; List get intList; List get dateTimeList; Map get map; Map get stringStringMap; Map get dynamicIntMap; Map get objectDateTimeMap; List>>>> get crazyComplex; Map get val; bool get writeNotNull; String get string; SimpleObject get simpleObject; StrictKeysObject get strictKeysObject; int get validatedPropertyNo42; Map toJson() { final val = { 'no-42': ctorValidatedNo42, }; void writeNotNull(String key, dynamic value) { if (value != null) { val[key] = value; } } writeNotNull('dateTime', dateTime?.toIso8601String()); writeNotNull('iterable', iterable?.toList()); val['dynamicIterable'] = dynamicIterable?.toList(); val['objectIterable'] = objectIterable?.toList(); val['intIterable'] = intIterable?.toList(); val['set'] = set?.toList(); val['dynamicSet'] = dynamicSet?.toList(); val['objectSet'] = objectSet?.toList(); val['intSet'] = intSet?.toList(); val['dateTimeSet'] = dateTimeSet?.map((e) => e?.toIso8601String())?.toList(); val['datetime-iterable'] = dateTimeIterable?.map((e) => e?.toIso8601String())?.toList(); val['list'] = list; val['dynamicList'] = dynamicList; val['objectList'] = objectList; val['intList'] = intList; writeNotNull('dateTimeList', dateTimeList?.map((e) => e?.toIso8601String())?.toList()); val['map'] = map; val['stringStringMap'] = stringStringMap; val['dynamicIntMap'] = dynamicIntMap; val['objectDateTimeMap'] = objectDateTimeMap?.map((k, e) => MapEntry(k, e?.toIso8601String())); writeNotNull( 'crazyComplex', crazyComplex ?.map((e) => e?.map((k, e) => MapEntry( k, e?.map((k, e) => MapEntry( k, e ?.map((e) => e?.map((e) => e?.toIso8601String())?.toList()) ?.toList()))))) ?.toList()); writeNotNull('val', this.val); val['writeNotNull'] = this.writeNotNull; val[r'$string'] = string; val['simpleObject'] = simpleObject; val['strictKeysObject'] = strictKeysObject; val['validatedPropertyNo42'] = validatedPropertyNo42; return val; } } JsonConverterTestClass _$JsonConverterTestClassFromJson(Map json) { return JsonConverterTestClass() ..duration = json['duration'] == null ? null : durationConverter.fromJson(json['duration'] as int) ..durationList = (json['durationList'] as List) ?.map((e) => e == null ? null : durationConverter.fromJson(e as int)) ?.toList() ..bigInt = json['bigInt'] == null ? null : const BigIntStringConverter().fromJson(json['bigInt'] as String) ..bigIntMap = (json['bigIntMap'] as Map)?.map((k, e) => MapEntry( k as String, e == null ? null : const BigIntStringConverter().fromJson(e as String))) ..numberSilly = json['numberSilly'] == null ? null : TrivialNumberConverter.instance.fromJson(json['numberSilly'] as int) ..numberSillySet = (json['numberSillySet'] as List) ?.map((e) => e == null ? null : TrivialNumberConverter.instance.fromJson(e as int)) ?.toSet() ..dateTime = json['dateTime'] == null ? null : const EpochDateTimeConverter().fromJson(json['dateTime'] as int); } abstract class _$JsonConverterTestClassSerializerMixin { Duration get duration; List get durationList; BigInt get bigInt; Map get bigIntMap; TrivialNumber get numberSilly; Set get numberSillySet; DateTime get dateTime; Map toJson() => { 'duration': duration == null ? null : durationConverter.toJson(duration), 'durationList': durationList ?.map((e) => e == null ? null : durationConverter.toJson(e)) ?.toList(), 'bigInt': bigInt == null ? null : const BigIntStringConverter().toJson(bigInt), 'bigIntMap': bigIntMap?.map((k, e) => MapEntry( k, e == null ? null : const BigIntStringConverter().toJson(e))), 'numberSilly': numberSilly == null ? null : TrivialNumberConverter.instance.toJson(numberSilly), 'numberSillySet': numberSillySet ?.map((e) => e == null ? null : TrivialNumberConverter.instance.toJson(e)) ?.toList(), 'dateTime': dateTime == null ? null : const EpochDateTimeConverter().toJson(dateTime) }; } JsonConverterGeneric _$JsonConverterGenericFromJson( Map json) { return JsonConverterGeneric() ..item = json['item'] == null ? null : GenericConverter().fromJson(json['item'] as Map) ..itemList = (json['itemList'] as List) ?.map((e) => e == null ? null : GenericConverter().fromJson(e as Map)) ?.toList() ..itemMap = (json['itemMap'] as Map)?.map((k, e) => MapEntry( k as String, e == null ? null : GenericConverter().fromJson(e as Map))); } abstract class _$JsonConverterGenericSerializerMixin { S get item; List get itemList; Map get itemMap; Map toJson() => { 'item': item == null ? null : GenericConverter().toJson(item), 'itemList': itemList ?.map((e) => e == null ? null : GenericConverter().toJson(e)) ?.toList(), 'itemMap': itemMap?.map((k, e) => MapEntry(k, e == null ? null : GenericConverter().toJson(e))) }; }