toJsonLd method

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

Serialize SchemaGuide to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'Guide',
      'category': convertToJsonLd(
          category,
          (v) =>
              v is SchemaCategoryCode ||
              v is SchemaPhysicalActivityCategory ||
              v is String ||
              v is SchemaThing),
      'reviewAspect': convertToJsonLd(
          reviewAspect, (v) => v is String || v is SchemaStructuredValue),
    });