ChannelDescriptor.fromJson constructor
Create from JSON.
Implementation
factory ChannelDescriptor.fromJson(Map<String, dynamic> json) {
return ChannelDescriptor(
id: json['id'] as String,
name: json['name'] as String,
type: json['type'] as String,
resources: (json['resources'] as List<dynamic>?)
?.map(
(e) => ResourceDescriptor.fromJson(e as Map<String, dynamic>))
.toList() ??
[],
children: (json['children'] as List<dynamic>?)
?.map((e) => ChannelDescriptor.fromJson(e as Map<String, dynamic>))
.toList(),
);
}