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, [SchemaMediaObject, String]),
      'embeddedTextCaption': convertToJsonLd(embeddedTextCaption, [String]),
      'exifData': convertToJsonLd(exifData, [SchemaPropertyValue, String]),
      'representativeOfPage': convertToJsonLd(representativeOfPage, [bool]),
    });