toJsonLd method

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

Serialize SchemaFoodEstablishment to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'FoodEstablishment',
      'acceptsReservations':
          convertToJsonLd(acceptsReservations, [String, bool]),
      'hasMenu': convertToJsonLd(hasMenu, [SchemaMenu, String]),
      'menu': convertToJsonLd(menu, [SchemaMenu, String]),
      'servesCuisine': convertToJsonLd(servesCuisine, [String]),
      'starRating': convertToJsonLd(starRating, [SchemaRating]),
    });