admin管理员组文章数量:1123931
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.
本文标签: templatesAWS API Gateway VTL not handling Map type as JSONStack Overflow
版权声明:本文标题:templates - AWS API Gateway VTL not handling Map type as JSON - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736609631a1945412.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论