Reputation: 123
I'm trying to account for dynamic objects coming into an endpoint and using a mapping template to transform it to the proper outout. However, the serialization is a but whacky causing the below error. Here is what i'm trying to do:
#set($Data = $util.escapeJavaScript({ "A": { "N": "$inputRoot.data.a" }, "B": { "N": "$inputRoot.data.b" } }))
This is how it is being serialized which doesn't seem to be valid
"MyColumn": {
"M": {A={N=0.37}, B={N=-0.12}}
}
The Gateway returns this exception
{"__type":"com.amazon.coral.service#SerializationException"}
i have also tried $util.toJson(...)
and #jtoJson(..)
but it makes no difference other than $util.toJson seems to throw an internal error.
Upvotes: 0
Views: 20