You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Serializing a Mail object to/from JSON does not result in equivalent objects. #189
sameBeanAs is in the shazamcrest library and performs a recursive deep equality check.
The first issue is that the from attribute is not deserialized correctly: com.sendgrid.Mail@401e7803[from=<null>,subject=subject,personalization=[com.sendgrid.Personalization@43a0cee9],content=[com.sendgrid.Content@eb21112],attachments=<null>,templateId=<null>,sections=<null>,headers=<null>,categories=<null>,customArgs=<null>,sendAt=0,batchId=<null>,asm=<null>,ipPoolId=<null>,mailSettings=<null>,trackingSettings=<null>,replyTo=<null>]
This seems to be because the Mail object has public attributes and non-standard getters:
The goal is to write a Mail object to a queue so that we can have a process that manages a circuit breaker, rate limiting, retries and DLQ behavior. Right now, I can write the JSON to the queue, but it doesn't deserialize properly when being read.
Activity
thinkingserious commentedon Mar 27, 2017
Thanks for alerting us to this issue @efenderbosch!
I have added this to our backlog for implementation.
This issue can rise in our queue via additional +1's or comments on this issue or it can move up our queue the fastest with a PR.
Thanks!
Elmer
sean-shou commentedon May 8, 2017
3.2.1 still have this issue. My template solution is create my own 'mail' object.
public class MyMail extends Mail{
public MyDesktopMail() {
}
thinkingserious commentedon May 9, 2017
Thats awesome @sean-shou :)
Would you be open to making a PR to add this to our library as a helper?