$RecommendSongDataFromJson function

RecommendSongData $RecommendSongDataFromJson(
  1. Map<String, dynamic> json
)

Implementation

RecommendSongData $RecommendSongDataFromJson(Map<String, dynamic> json) {
  final RecommendSongData recommendSongData = RecommendSongData();
  final List<RecommendSongDataDailySongs>? dailySongs = (json['dailySongs'] as List<dynamic>?)
      ?.map(
          (e) => jsonConvert.convert<RecommendSongDataDailySongs>(e) as RecommendSongDataDailySongs)
      .toList();
  if (dailySongs != null) {
    recommendSongData.dailySongs = dailySongs;
  }
  final List<dynamic>? orderSongs = (json['orderSongs'] as List<dynamic>?)?.map(
          (e) => e).toList();
  if (orderSongs != null) {
    recommendSongData.orderSongs = orderSongs;
  }
  final List<
      RecommendSongDataRecommendReasons>? recommendReasons = (json['recommendReasons'] as List<
      dynamic>?)?.map(
          (e) =>
      jsonConvert.convert<RecommendSongDataRecommendReasons>(
          e) as RecommendSongDataRecommendReasons).toList();
  if (recommendReasons != null) {
    recommendSongData.recommendReasons = recommendReasons;
  }
  final dynamic mvResourceInfos = json['mvResourceInfos'];
  if (mvResourceInfos != null) {
    recommendSongData.mvResourceInfos = mvResourceInfos;
  }
  final bool? demote = jsonConvert.convert<bool>(json['demote']);
  if (demote != null) {
    recommendSongData.demote = demote;
  }
  return recommendSongData;
}