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
We are currently using Mandrill.net to send transactional email, using Handlebar templates. When sending content for our desired template, the default serializer configured in Mandrill.net is ignoring null value fields: `NullValueHandling = NullValueHandling.Ignore,' This means that the footprint of the elements in our merge variable content list can differ, depending on the values that are non-null. EX, a list of object's with properties A, B, C and D may look like:
[
{
"A": "A content",
"D": "D content"
},
{
"A": "A content",
"B": "B content"
},
{
"B": "B new content",
"C": "C content"
}
]
We have noticed that when this is the case, the Handlebars template engine in Mandrill will "hold onto values" out of scope of the current loop variable, if they are not defined as null. In this example, the first result would render with values A and D, correctly. The second value, however, would have values A, B, and D - even though D was not part of the second element of the list, etc. Ex:
A Content, D Content
A Content, B Content, D Content
A Content, B New Content, C Content, D Content
For us, this is a big issue - we are hoping that simply passing null's into Mandrill will prevent, but are still looking into solutions at this time. Does anyone have any ideas on ways to prevent this scoping issue? Would it be possible to override the serializer used by Mandrill.net without branching and/or configuring this as an optional setting? Help is very appreciated!
Thanks,
Matt Ramsey
The text was updated successfully, but these errors were encountered:
We are currently using Mandrill.net to send transactional email, using Handlebar templates. When sending content for our desired template, the default serializer configured in Mandrill.net is ignoring null value fields: `NullValueHandling = NullValueHandling.Ignore,' This means that the footprint of the elements in our merge variable content list can differ, depending on the values that are non-null. EX, a list of object's with properties A, B, C and D may look like:
We have noticed that when this is the case, the Handlebars template engine in Mandrill will "hold onto values" out of scope of the current loop variable, if they are not defined as null. In this example, the first result would render with values A and D, correctly. The second value, however, would have values A, B, and D - even though D was not part of the second element of the list, etc. Ex:
For us, this is a big issue - we are hoping that simply passing null's into Mandrill will prevent, but are still looking into solutions at this time. Does anyone have any ideas on ways to prevent this scoping issue? Would it be possible to override the serializer used by Mandrill.net without branching and/or configuring this as an optional setting? Help is very appreciated!
Thanks,
Matt Ramsey
The text was updated successfully, but these errors were encountered: