toJson method

Map<String, dynamic> toJson()

Allows you to serialize object.

Implementation

Map<String, dynamic> toJson() {
  if (_docType == "org.iso.18013.5.1.mDL") {
    return (this as DocumentRequest18013MDL).toJson();
  }
  return {
    "docType": _docType,
    "namespaces": _namespaces.map((item) => item.toJson()),
  }.clearNulls();
}