fromJson static method

VDSNCData? fromJson(
  1. dynamic jsonObject
)

Allows you to deserialize object.

Implementation

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

  result._type = jsonObject["type"];
  result._version = jsonObject["version"];
  result._issuingCountry = jsonObject["issuingCountry"];
  result._message = jsonObject["message"];
  result._signatureAlgorithm = jsonObject["signatureAlgorithm"];
  result._signature = BytesData.fromJson(jsonObject["signature"]);
  result._certificate = BytesData.fromJson(jsonObject["certificate"]);
  for (var item in jsonObject["certificateChain"]) {
    result._certificateChain.addSafe(CertificateChain.fromJson(item));
  }
  result._notifications = jsonObject["notifications"] == null
      ? null
      : List<int>.from(jsonObject["notifications"]);

  return result;
}