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