toJson method

Map<String, dynamic> toJson()

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(),
};