toJsonLd method

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

Serialize SchemaOwnershipInfo to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'OwnershipInfo',
      'acquiredFrom':
          convertToJsonLd(acquiredFrom, [SchemaOrganization, SchemaPerson]),
      'ownedFrom': convertToJsonLd(ownedFrom, [String]),
      'ownedThrough': convertToJsonLd(ownedThrough, [String]),
      'typeOfGood':
          convertToJsonLd(typeOfGood, [SchemaProduct, SchemaService]),
    });