Map<String, dynamic> toJson() => { 'key': key, 'keyType': keyType, 'expiryDate': JsonConverters.toJson(expiryDate, 'DateTime', context!) };