如何通过使用GWT AutoBean反序列化BigDecimal? [英] How to deserialize BigDecimal by using GWT AutoBean?

查看:184
本文介绍了如何通过使用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.

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

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

这篇关于如何通过使用GWT AutoBean反序列化BigDecimal?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆