$TopArtistEntityFromJson function

TopArtistEntity $TopArtistEntityFromJson(
  1. Map<String, dynamic> json
)

Implementation

TopArtistEntity $TopArtistEntityFromJson(Map<String, dynamic> json) {
  final TopArtistEntity topArtistEntity = TopArtistEntity();
  final int? code = jsonConvert.convert<int>(json['code']);
  if (code != null) {
    topArtistEntity.code = code;
  }
  final bool? more = jsonConvert.convert<bool>(json['more']);
  if (more != null) {
    topArtistEntity.more = more;
  }
  final List<TopArtistArtists>? artists = (json['artists'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<TopArtistArtists>(e) as TopArtistArtists).toList();
  if (artists != null) {
    topArtistEntity.artists = artists;
  }
  return topArtistEntity;
}