Captions.fromJson constructor

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

Implementation

factory Captions.fromJson(Map<String, dynamic> json) {
  return Captions(
    captionFormats: (json['CaptionFormats'] as List?)
        ?.whereNotNull()
        .map((e) => CaptionFormat.fromJson(e as Map<String, dynamic>))
        .toList(),
    captionSources: (json['CaptionSources'] as List?)
        ?.whereNotNull()
        .map((e) => CaptionSource.fromJson(e as Map<String, dynamic>))
        .toList(),
    mergePolicy: json['MergePolicy'] as String?,
  );
}