toJson method
Implementation
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> jsonObject = {};
jsonObject['id'] = id;
if (name != null) jsonObject['name'] = name;
if (purpose != null) jsonObject['purpose'] = purpose;
if (format != null) jsonObject['format'] = format!.toJson();
if (constraints != null) jsonObject['constraints'] = constraints!.toJson();
if (group != null) jsonObject['group'] = group;
return jsonObject;
}