SendGrid supports structured data and arrays in dynamic templates data. It would be great if Personalization structure supported this as well. Right now it only supports [String: String] as dynamicTemplateData. I hope my observation isn't wrong, because I haven't tested SendGrid structured data payload yet. 😄
I'd suggest to replace it with [String: Encodable] or custom Encodable structure directly. I've had a look at the source code and it seems the update wouldn't be hard. I'll try to implement it when I have some time.
SendGrid supports structured data and arrays in dynamic templates data. It would be great if
Personalization
structure supported this as well. Right now it only supports[String: String]
asdynamicTemplateData
. I hope my observation isn't wrong, because I haven't tested SendGrid structured data payload yet. 😄I'd suggest to replace it with
[String: Encodable]
or customEncodable
structure directly. I've had a look at the source code and it seems the update wouldn't be hard. I'll try to implement it when I have some time.