@override Object toJson() => { if (datapoints.isNotDefault) 'datapoints': [for (final i in datapoints) i.toJson()], };