toJson method
Implementation
@override
Object toJson() => {
if (count.isNotDefault) 'count': encodeInt64(count),
if (mean.isNotDefault) 'mean': encodeDouble(mean),
if (sumOfSquaredDeviation.isNotDefault)
'sumOfSquaredDeviation': encodeDouble(sumOfSquaredDeviation),
if (range != null) 'range': range!.toJson(),
if (bucketOptions != null) 'bucketOptions': bucketOptions!.toJson(),
if (bucketCounts.isNotDefault) 'bucketCounts': bucketCounts,
if (exemplars.isNotDefault) 'exemplars': encodeList(exemplars),
};