toJsonLd method

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

Serialize SchemaSomeProducts to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      '@context': 'https://schema.org',
      '@type': 'SomeProducts',
      'inventoryLevel':
          convertToJsonLd(inventoryLevel, [SchemaQuantitativeValue]),
      'additionalProperty':
          convertToJsonLd(additionalProperty, [SchemaPropertyValue]),
      'aggregateRating':
          convertToJsonLd(aggregateRating, [SchemaAggregateRating]),
      'asin': convertToJsonLd(asin, [String, String]),
      'audience': convertToJsonLd(audience, [SchemaAudience]),
      'award': convertToJsonLd(award, [String]),
      'awards': convertToJsonLd(awards, [String]),
      'brand': convertToJsonLd(brand, [SchemaBrand, SchemaOrganization]),
      'category': convertToJsonLd(category, [
        SchemaCategoryCode,
        SchemaPhysicalActivityCategory,
        String,
        String,
        SchemaThing
      ]),
      'color': convertToJsonLd(color, [String]),
      'colorSwatch':
          convertToJsonLd(colorSwatch, [SchemaImageObject, String]),
      'countryOfAssembly': convertToJsonLd(countryOfAssembly, [String]),
      'countryOfLastProcessing':
          convertToJsonLd(countryOfLastProcessing, [String]),
      'countryOfOrigin': convertToJsonLd(countryOfOrigin, [SchemaCountry]),
      'depth':
          convertToJsonLd(depth, [SchemaDistance, SchemaQuantitativeValue]),
      'funding': convertToJsonLd(funding, [SchemaGrant]),
      'gtin': convertToJsonLd(gtin, [String, String]),
      'gtin12': convertToJsonLd(gtin12, [String]),
      'gtin13': convertToJsonLd(gtin13, [String]),
      'gtin14': convertToJsonLd(gtin14, [String]),
      'gtin8': convertToJsonLd(gtin8, [String]),
      'hasAdultConsideration': convertToJsonLd(
          hasAdultConsideration, [SchemaAdultOrientedEnumeration]),
      'hasCertification':
          convertToJsonLd(hasCertification, [SchemaCertification]),
      'hasEnergyConsumptionDetails': convertToJsonLd(
          hasEnergyConsumptionDetails, [SchemaEnergyConsumptionDetails]),
      'hasMeasurement':
          convertToJsonLd(hasMeasurement, [SchemaQuantitativeValue]),
      'hasMerchantReturnPolicy': convertToJsonLd(
          hasMerchantReturnPolicy, [SchemaMerchantReturnPolicy]),
      'height':
          convertToJsonLd(height, [SchemaDistance, SchemaQuantitativeValue]),
      'inProductGroupWithID': convertToJsonLd(inProductGroupWithID, [String]),
      'isAccessoryOrSparePartFor':
          convertToJsonLd(isAccessoryOrSparePartFor, [SchemaProduct]),
      'isConsumableFor': convertToJsonLd(isConsumableFor, [SchemaProduct]),
      'isFamilyFriendly': convertToJsonLd(isFamilyFriendly, [bool]),
      'isRelatedTo':
          convertToJsonLd(isRelatedTo, [SchemaProduct, SchemaService]),
      'isSimilarTo':
          convertToJsonLd(isSimilarTo, [SchemaProduct, SchemaService]),
      'isVariantOf': convertToJsonLd(
          isVariantOf, [SchemaProductGroup, SchemaProductModel]),
      'itemCondition':
          convertToJsonLd(itemCondition, [SchemaOfferItemCondition]),
      'keywords':
          convertToJsonLd(keywords, [SchemaDefinedTerm, String, String]),
      'logo': convertToJsonLd(logo, [SchemaImageObject, String]),
      'manufacturer': convertToJsonLd(manufacturer, [SchemaOrganization]),
      'material': convertToJsonLd(material, [SchemaProduct, String, String]),
      'mobileUrl': convertToJsonLd(mobileUrl, [String]),
      'model': convertToJsonLd(model, [SchemaProductModel, String]),
      'mpn': convertToJsonLd(mpn, [String]),
      'negativeNotes': convertToJsonLd(negativeNotes,
          [SchemaItemList, SchemaListItem, String, SchemaWebContent]),
      'nsn': convertToJsonLd(nsn, [String]),
      'offers': convertToJsonLd(offers, [SchemaDemand, SchemaOffer]),
      'pattern': convertToJsonLd(pattern, [SchemaDefinedTerm, String]),
      'positiveNotes': convertToJsonLd(positiveNotes,
          [SchemaItemList, SchemaListItem, String, SchemaWebContent]),
      'productID': convertToJsonLd(productID, [String]),
      'productionDate': convertToJsonLd(productionDate, [String]),
      'purchaseDate': convertToJsonLd(purchaseDate, [String]),
      'releaseDate': convertToJsonLd(releaseDate, [String]),
      'review': convertToJsonLd(review, [SchemaReview]),
      'reviews': convertToJsonLd(reviews, [SchemaReview]),
      'size': convertToJsonLd(size, [
        SchemaDefinedTerm,
        SchemaQuantitativeValue,
        SchemaSizeSpecification,
        String
      ]),
      'sku': convertToJsonLd(sku, [String]),
      'slogan': convertToJsonLd(slogan, [String]),
      'weight': convertToJsonLd(weight, [SchemaQuantitativeValue]),
      'width':
          convertToJsonLd(width, [SchemaDistance, SchemaQuantitativeValue]),
      'additionalType': convertToJsonLd(additionalType, [String, String]),
      'alternateName': convertToJsonLd(alternateName, [String]),
      'description': convertToJsonLd(description, [String, SchemaTextObject]),
      'disambiguatingDescription':
          convertToJsonLd(disambiguatingDescription, [String]),
      'identifier':
          convertToJsonLd(identifier, [SchemaPropertyValue, String, String]),
      'image': convertToJsonLd(image, [SchemaImageObject, String]),
      'mainEntityOfPage':
          convertToJsonLd(mainEntityOfPage, [SchemaCreativeWork, String]),
      'name': convertToJsonLd(name, [String]),
      'potentialAction': convertToJsonLd(potentialAction, [SchemaAction]),
      'sameAs': convertToJsonLd(sameAs, [String]),
      'subjectOf':
          convertToJsonLd(subjectOf, [SchemaCreativeWork, SchemaEvent]),
      'url': convertToJsonLd(url, [String]),
    });