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