如何通过使用GWT AutoBean反序列化BigDecimal?

编程入门 行业动态 更新时间:2024-10-25 08:18:26
本文介绍了如何通过使用GWT AutoBean反序列化BigDecimal?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有来自服务器的json,代表pojos.当我使用AutoBean反序列化为json时,有些方法有些无效!我发现那些不能反序列化的具有BigDecimal getter/setter.

I have json coming from server and representing pojos. When i deserialize to json using AutoBean some works some dont! I figure out that those which cant be deserialize has BigDecimal getters/setters.

错误:

TypeError:无法读取未定义的属性"length" 在java_math_BigDecimal_ $ initFrom__Ljava_math_BigDecimal_2Ljava_lang_String_2

TypeError: Cannot read property 'length' of undefined at java_math_BigDecimal_$initFrom__Ljava_math_BigDecimal_2Ljava_lang_String_2

在使用AutoBean反序列化时如何将BigDecimal转换为GWT?

How to handle BigDecimal into GWT while deserializing with AutoBean?

ps:

嵌套的问题是这个一个

推荐答案

AutoBean期望BigDecimal作为JSON有效负载中的字符串.

AutoBean expects BigDecimal as strings in the JSON payload.

我们在 gwt-code-reviews.appspot/1601805上进行了讨论. / 尽管可以提出问题,但决定不是不",而是不是现在".

We discussed it at gwt-code-reviews.appspot/1601805/ Feel free to file an issue though, the decision was not a "no" but rather a "not now".

更多推荐

如何通过使用GWT AutoBean反序列化BigDecimal?

本文发布于:2023-10-19 18:03:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1508333.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:序列化   GWT   AutoBean   BigDecimal

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!