toJson method
Converts a VolumeError instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempMessage = message;
final tempTime = time;
if (tempMessage != null) {
jsonData['message'] = tempMessage;
}
if (tempTime != null) {
jsonData['time'] = tempTime;
}
return jsonData;
}