toJsonLd method

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

Serialize SchemaConstraintNode to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'ConstraintNode',
      'constraintProperty': convertToJsonLd(
          constraintProperty, (v) => v is SchemaProperty || v is String),
      'numConstraints': convertToJsonLd(numConstraints),
    });