toJsonLd method
Serialize SchemaMessage to JSON-LD
Implementation
@override
Map<String, dynamic> toJsonLd() => removeEmpty({
...super.toJsonLd(),
'@type': 'Message',
'bccRecipient': convertToJsonLd(bccRecipient,
[SchemaContactPoint, SchemaOrganization, SchemaPerson]),
'ccRecipient': convertToJsonLd(ccRecipient,
[SchemaContactPoint, SchemaOrganization, SchemaPerson]),
'dateRead': convertToJsonLd(dateRead, [String]),
'dateReceived': convertToJsonLd(dateReceived, [String]),
'dateSent': convertToJsonLd(dateSent, [String]),
'messageAttachment':
convertToJsonLd(messageAttachment, [SchemaCreativeWork]),
'recipient': convertToJsonLd(recipient, [
SchemaAudience,
SchemaContactPoint,
SchemaOrganization,
SchemaPerson
]),
'sender': convertToJsonLd(
sender, [SchemaAudience, SchemaOrganization, SchemaPerson]),
'toRecipient': convertToJsonLd(toRecipient, [
SchemaAudience,
SchemaContactPoint,
SchemaOrganization,
SchemaPerson
]),
});