toJsonLd method

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

Serialize SchemaError to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'Error',
      'errorCode': convertToJsonLd(
          errorCode,
          (v) =>
              v is SchemaDefinedTerm ||
              v is SchemaStatusEnumeration ||
              v is String ||
              v is int),
    });