toJson method
Converts the AnalysedData object to a JSON string.
Implementation
String toJson() {
final json = jsonEncode({
'compartment': component,
'test_no': testNo,
'course_name': courseName,
'course_code': courseCode,
'semester': semester,
'qp_pattern': qpPattern,
});
return json;
}