GatewaySpec.fromJson constructor

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

Creates a GatewaySpec from JSON data.

Implementation

GatewaySpec.fromJson(Map<String, dynamic> json)
    : this(
        servers: json['servers'] != null
            ? Server.listFromJson((json['servers'] as Iterable)
                .cast<Map<String, dynamic>>()
                .toList())
            : null,
        selector: json['selector'] != null
            ? Map<String, String>.from(json['selector'])
            : null,
      );