toJson method
Converts a SecretProjection instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempItems = items;
final tempName = name;
final tempOptional = optional;
if (tempItems != null) {
jsonData['items'] =
tempItems.map((e) => e.toJson()).toList(growable: false);
}
if (tempName != null) {
jsonData['name'] = tempName;
}
if (tempOptional != null) {
jsonData['optional'] = tempOptional;
}
return jsonData;
}