toJson method
Converts a ExternalDocumentation instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempDescription = description;
final tempUrl = url;
if (tempDescription != null) {
jsonData['description'] = tempDescription;
}
if (tempUrl != null) {
jsonData['url'] = tempUrl;
}
return jsonData;
}