toJson method
Implementation
@override
Map<String, dynamic> toJson() {
if (_originalDoc != null) return _originalDoc!;
Map<String, dynamic> jsonObject = {};
jsonObject['@context'] = context;
if (id != null) jsonObject['id'] = id;
jsonObject['type'] = type;
jsonObject['credentialSubject'] = credentialSubject;
jsonObject['issuer'] = issuer;
jsonObject['issuanceDate'] = issuanceDate.toIso8601String();
if (proof != null) jsonObject['proof'] = proof!.toJson();
if (status != null) jsonObject['credentialStatus'] = status!.toJson();
if (credentialSchema != null) {
jsonObject['credentialSchema'] = credentialSchema!.toJson();
}
return jsonObject;
}