ClientPolicyTls.fromJson constructor

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

Implementation

factory ClientPolicyTls.fromJson(Map<String, dynamic> json) {
  return ClientPolicyTls(
    validation: TlsValidationContext.fromJson(
        json['validation'] as Map<String, dynamic>),
    enforce: json['enforce'] as bool?,
    ports: (json['ports'] as List?)
        ?.whereNotNull()
        .map((e) => e as int)
        .toList(),
  );
}