我有来自服务器的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?
发布评论