toJson method
Implementation
Map<String, Object?> toJson() {
var title = this.title;
var id = this.id;
var body = this.body;
final json = <String, Object?>{};
if (title != null) {
json[r'title'] = title;
}
if (id != null) {
json[r'id'] = id;
}
if (body != null) {
json[r'body'] = body.toJson();
}
return json;
}