PlacementTemplate.fromJson constructor

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

Implementation

factory PlacementTemplate.fromJson(Map<String, dynamic> json) {
  return PlacementTemplate(
    defaultAttributes: (json['defaultAttributes'] as Map<String, dynamic>?)
        ?.map((k, e) => MapEntry(k, e as String)),
    deviceTemplates: (json['deviceTemplates'] as Map<String, dynamic>?)?.map(
        (k, e) =>
            MapEntry(k, DeviceTemplate.fromJson(e as Map<String, dynamic>))),
  );
}