Server.fromJson constructor

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

Creates a Server from JSON data.

Implementation

Server.fromJson(Map<String, dynamic> json)
    : this(
        name: json['name'],
        defaultEndpoint: json['defaultEndpoint'],
        bind: json['bind'],
        port: json['port'] != null ? Port.fromJson(json['port']) : null,
        hosts:
            json['hosts'] != null ? List<String>.from(json['hosts']) : null,
        tls: json['tls'] != null
            ? ServerTLSSettings.fromJson(json['tls'])
            : null,
      );