PatchbayNavigationCatalogWire.fromJson constructor

PatchbayNavigationCatalogWire.fromJson(
  1. Map<String, Object?> json, {
  2. String path = r'$',
})

Decodes a strict JSON object at path.

Implementation

factory PatchbayNavigationCatalogWire.fromJson(
  Map<String, Object?> json, {
  String path = r'$',
}) {
  _wireKeys(json, const <String>{
    'outcome',
    'source',
    'navigationRevision',
    'destinations',
  }, path);
  return PatchbayNavigationCatalogWire(
    outcome: _wireString(json['outcome'], '$path.outcome'),
    source: PatchbayFactSourceWire.fromJson(
      json['source'],
      path: '$path.source',
    ),
    navigationRevision: _wireInt(
      json['navigationRevision'],
      '$path.navigationRevision',
    ),
    destinations: _wireList(json['destinations'], '$path.destinations')
        .map(
          (item) => PatchbayDestinationDescriptorWire.fromJson(
            _wireMap(item, '$path.destinations[]'),
            path: '$path.destinations[]',
          ),
        )
        .toList(growable: false),
  );
}