fromJson static method

SignerInfo? fromJson(
  1. dynamic jsonObject
)

Implementation

static SignerInfo? fromJson(jsonObject) {
  if (jsonObject == null) return null;
  var result = new SignerInfo();

  result.version = jsonObject["version"];
  result.paStatus = jsonObject["paStatus"];
  result.dataToHash = jsonObject["dataToHash"];
  result.digestAlgorithm = jsonObject["digestAlgorithm"];
  result.signatureAlgorithm = jsonObject["signatureAlgorithm"];
  result.serialNumber = Value.fromJson(jsonObject["serialNumber"]);
  result.signature = Value.fromJson(jsonObject["signature"]);
  result.subjectKeyIdentifier = Value.fromJson(jsonObject["subjectKeyIdentifier"]);
  result.issuer = Authority.fromJson(jsonObject["issuer"]);
  if (jsonObject["notifications"] != null)
    for (var item in jsonObject["notifications"])
      result.notifications.add(item);
  if (jsonObject["signedAttributes"] != null)
    for (var item in jsonObject["signedAttributes"])
      result.signedAttributes.add(Extension.fromJson(item));
  if (jsonObject["certificateChain"] != null)
    for (var item in jsonObject["certificateChain"])
      result.certificateChain.add(CertificateChain.fromJson(item));

  return result;
}