SignedExchangeSignature.fromJson constructor

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

Implementation

factory SignedExchangeSignature.fromJson(Map<String, dynamic> json) {
  return SignedExchangeSignature(
    label: json['label'] as String,
    signature: json['signature'] as String,
    integrity: json['integrity'] as String,
    certUrl: json.containsKey('certUrl') ? json['certUrl'] as String : null,
    certSha256:
        json.containsKey('certSha256') ? json['certSha256'] as String : null,
    validityUrl: json['validityUrl'] as String,
    date: json['date'] as int,
    expires: json['expires'] as int,
    certificates: json.containsKey('certificates')
        ? (json['certificates'] as List).map((e) => e as String).toList()
        : null,
  );
}