Dash.fromJson constructor

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

Implementation

Dash.fromJson(Map<String, dynamic> json) {
  if (json["streams_avc"] is List)
    this.streamsAvc = json["streams_avc"] == null
        ? null
        : (json["streams_avc"] as List)
            .map((e) => StreamsAvc.fromJson(e))
            .toList();
  if (json["cdns"] is Map)
    this.cdns = json["cdns"] == null ? null : Cdns.fromJson(json["cdns"]);
  if (json["streams"] is List)
    this.streams = json["streams"] == null
        ? null
        : (json["streams"] as List).map((e) => Streams.fromJson(e)).toList();
  if (json["streams_av1"] is List)
    this.streamsAv1 = json["streams_av1"] == null
        ? null
        : (json["streams_av1"] as List)
            .map((e) => StreamsAv1.fromJson(e))
            .toList();
  if (json["separate_av"] is bool) this.separateAv = json["separate_av"];
  if (json["default_cdn"] is String) this.defaultCdn = json["default_cdn"];
}