GetPersonalizedRankingResponse.fromJson constructor

GetPersonalizedRankingResponse.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory GetPersonalizedRankingResponse.fromJson(Map<String, dynamic> json) {
  return GetPersonalizedRankingResponse(
    personalizedRanking: (json['personalizedRanking'] as List?)
        ?.whereNotNull()
        .map((e) => PredictedItem.fromJson(e as Map<String, dynamic>))
        .toList(),
    recommendationId: json['recommendationId'] as String?,
  );
}