toJsonLd method

  1. @override
Map<String, dynamic> toJsonLd()
override

Serialize SchemaBusTrip to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'BusTrip',
      'arrivalBusStop':
          convertToJsonLd(arrivalBusStop, [SchemaBusStation, SchemaBusStop]),
      'busName': convertToJsonLd(busName, [String]),
      'busNumber': convertToJsonLd(busNumber, [String]),
      'departureBusStop': convertToJsonLd(
          departureBusStop, [SchemaBusStation, SchemaBusStop]),
    });