toJsonLd method

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

Serialize SchemaSoftwareSourceCode to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'SoftwareSourceCode',
      'codeRepository': convertToJsonLd(codeRepository),
      'codeSampleType': convertToJsonLd(codeSampleType),
      'programmingLanguage': convertToJsonLd(programmingLanguage,
          (v) => v is SchemaComputerLanguage || v is String),
      'runtime': convertToJsonLd(runtime),
      'runtimePlatform': convertToJsonLd(
          runtimePlatform, (v) => v is SchemaRuntimePlatform || v is String),
      'sampleType': convertToJsonLd(sampleType),
      'targetProduct': convertToJsonLd(targetProduct),
    });