toJson method
Converts a EventSeries instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempCount = count;
final tempLastObservedTime = lastObservedTime;
if (tempCount != null) {
jsonData['count'] = tempCount;
}
if (tempLastObservedTime != null) {
jsonData['lastObservedTime'] = tempLastObservedTime;
}
return jsonData;
}