toJsonLd method

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

Serialize SchemaImageObject to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'ImageObject',
      'caption': convertToJsonLd(
          caption, (v) => v is SchemaMediaObject || v is String),
      'embeddedTextCaption': convertToJsonLd(embeddedTextCaption),
      'exifData': convertToJsonLd(
          exifData, (v) => v is SchemaPropertyValue || v is String),
      'representativeOfPage': convertToJsonLd(representativeOfPage),
    });