BatchDetectSentimentResponse.fromJson constructor

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

Implementation

factory BatchDetectSentimentResponse.fromJson(Map<String, dynamic> json) {
  return BatchDetectSentimentResponse(
    errorList: (json['ErrorList'] as List)
        .whereNotNull()
        .map((e) => BatchItemError.fromJson(e as Map<String, dynamic>))
        .toList(),
    resultList: (json['ResultList'] as List)
        .whereNotNull()
        .map((e) => BatchDetectSentimentItemResult.fromJson(
            e as Map<String, dynamic>))
        .toList(),
  );
}