Create a JSON map from the application.
Map<String, dynamic> toJson() => { 'type': type, 'userId': userId, 'keyId': keyId, 'key': key, };