toJson method
Converts a ResourceHandle instance to JSON data.
Implementation
Map<String, Object> toJson() {
final jsonData = <String, Object>{};
final tempData = data;
final tempDriverName = driverName;
if (tempData != null) {
jsonData['data'] = tempData;
}
if (tempDriverName != null) {
jsonData['driverName'] = tempDriverName;
}
return jsonData;
}