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 = new DocumentType();

  result._pageIndex = jsonObject["pageIndex"];
  result._documentID = jsonObject["documentID"];
  result._dType = DocType.getByValue(jsonObject["dType"])!;
  result._dFormat = DocFormat.getByValue(jsonObject["dFormat"])!;
  result._dMRZ = jsonObject["dMRZ"];
  result._isDeprecated = jsonObject["isDeprecated"];
  result._name = jsonObject["name"];
  result._iCAOCode = jsonObject["ICAOCode"];
  result._dDescription = jsonObject["dDescription"];
  result._dYear = jsonObject["dYear"];
  result._dCountryName = jsonObject["dCountryName"];
  if (jsonObject["FDSID"] != null) {
    result._fDSID = [];
    for (var item in jsonObject["FDSID"]) result._fDSID!.add(item);
  }

  return result;
}