toJson method
Implementation
Map<String, dynamic> toJson() => {
'startTimeUnixNano': startTimeUnixNano,
'timeUnixNano': timeUnixNano,
'asDouble': value is int ? (value as int).toDouble() : value,
if (attributes.isNotEmpty)
'attributes': attributes.map((a) => a.toJson()).toList(),
};