toJson method
Implementation
@override
Map<String, dynamic> toJson() {
Map<String, dynamic> jsonObject = {};
jsonObject['id'] = id;
List input = [];
for (var des in inputDescriptors) {
input.add(des.toJson());
}
jsonObject['input_descriptors'] = input;
if (name != null) jsonObject['name'] = name;
if (purpose != null) jsonObject['purpose'] = purpose;
if (format != null) jsonObject['format'] = format!.toJson();
if (submissionRequirement != null) {
List sr = [];
for (var s in submissionRequirement!) {
sr.add(s.toJson());
}
jsonObject['submission_requirements'] = sr;
}
return jsonObject;
}