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