toJson method
Converts a ServiceAccountTokenProjection instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempAudience = audience;
final tempExpirationSeconds = expirationSeconds;
final tempPath = path;
if (tempAudience != null) {
jsonData['audience'] = tempAudience;
}
if (tempExpirationSeconds != null) {
jsonData['expirationSeconds'] = tempExpirationSeconds;
}
jsonData['path'] = tempPath;
return jsonData;
}