toJson method
Returns a JSON object which represents this object.
Implementation
Map<String, dynamic> toJson() {
return {
ApiFields.dateTime: dateTime.toWmataString(),
ApiFields.deviationMinutes: deviationMinutes,
ApiFields.direction: direction,
ApiFields.latitude: latitude,
ApiFields.longitude: longitude,
ApiFields.routeId: routeId,
ApiFields.tripStartTime: tripStartTime.toWmataString(),
ApiFields.tripEndTime: tripEndTime.toWmataString(),
ApiFields.tripHeadsign: tripHeadsign,
ApiFields.tripId: tripId,
ApiFields.vehicleId: vehicleId,
};
}