fromJson static method

DocumentType? fromJson(
  1. dynamic jsonObject
)

Allows you to deserialize object.

Implementation

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

  result._pageIndex = jsonObject["pageIndex"];
  result._id = jsonObject["documentID"];
  result._type = DocType.getByValue(jsonObject["dType"])!;
  result._format = DocFormat.getByValue(jsonObject["dFormat"])!;
  result._mrz = jsonObject["dMRZ"];
  result._isDeprecated = jsonObject["isDeprecated"];
  result._name = jsonObject["name"];
  result._iCAOCode = jsonObject["ICAOCode"];
  result._description = jsonObject["dDescription"];
  result._year = jsonObject["dYear"];
  result._countryName = jsonObject["dCountryName"];
  result._fDSID = jsonObject["FDSID"] == null
      ? null
      : List<int>.from(jsonObject["FDSID"]);

  return result;
}