toJsonLd method

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

Serialize SchemaDietarySupplement to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'DietarySupplement',
      'activeIngredient': convertToJsonLd(activeIngredient, [String]),
      'isProprietary': convertToJsonLd(isProprietary, [bool]),
      'legalStatus': convertToJsonLd(legalStatus,
          [SchemaDrugLegalStatus, SchemaMedicalEnumeration, String]),
      'maximumIntake':
          convertToJsonLd(maximumIntake, [SchemaMaximumDoseSchedule]),
      'mechanismOfAction': convertToJsonLd(mechanismOfAction, [String]),
      'nonProprietaryName': convertToJsonLd(nonProprietaryName, [String]),
      'proprietaryName': convertToJsonLd(proprietaryName, [String]),
      'recommendedIntake':
          convertToJsonLd(recommendedIntake, [SchemaRecommendedDoseSchedule]),
      'safetyConsideration': convertToJsonLd(safetyConsideration, [String]),
      'targetPopulation': convertToJsonLd(targetPopulation, [String]),
      'code': convertToJsonLd(code, [SchemaMedicalCode]),
      'guideline': convertToJsonLd(guideline, [SchemaMedicalGuideline]),
      'medicineSystem':
          convertToJsonLd(medicineSystem, [SchemaMedicineSystem]),
      'recognizingAuthority':
          convertToJsonLd(recognizingAuthority, [SchemaOrganization]),
      'relevantSpecialty':
          convertToJsonLd(relevantSpecialty, [SchemaMedicalSpecialty]),
      'study': convertToJsonLd(study, [SchemaMedicalStudy]),
    });