toJsonLd method
Serialize SchemaCourse to JSON-LD
Implementation
@override
Map<String, dynamic> toJsonLd() => removeEmpty({
...super.toJsonLd(),
'@type': 'Course',
'availableLanguage': convertToJsonLd(
availableLanguage, (v) => v is SchemaLanguage || v is String),
'courseCode': convertToJsonLd(courseCode),
'coursePrerequisites': convertToJsonLd(
coursePrerequisites,
(v) =>
v is SchemaAlignmentObject || v is SchemaCourse || v is String),
'educationalCredentialAwarded': convertToJsonLd(
educationalCredentialAwarded,
(v) => v is SchemaEducationalOccupationalCredential || v is String),
'financialAidEligible': convertToJsonLd(
financialAidEligible, (v) => v is SchemaDefinedTerm || v is String),
'hasCourseInstance': convertToJsonLd(hasCourseInstance),
'numberOfCredits': convertToJsonLd(
numberOfCredits, (v) => v is SchemaStructuredValue || v is int),
'occupationalCredentialAwarded': convertToJsonLd(
occupationalCredentialAwarded,
(v) => v is SchemaEducationalOccupationalCredential || v is String),
'syllabusSections': convertToJsonLd(syllabusSections),
'totalHistoricalEnrollment': convertToJsonLd(totalHistoricalEnrollment),
'competencyRequired': convertToJsonLd(
competencyRequired, (v) => v is SchemaDefinedTerm || v is String),
});