toJson method
Implementation
@override
Object toJson() => {
if (statsName.isNotDefault) 'statsName': statsName,
if (objectiveType.isNotDefault) 'objectiveType': objectiveType,
if (dataPoints.isNotDefault)
'dataPoints': [for (final i in dataPoints) i.toJson()],
};