BigDecimal serialization in GWT

What is your preferred approach to serializing BigDecimal in GWT?

Are there any clever workarounds, or are you just using Double or String?

Of all the pains in GWT, this is by far the biggest; I would not want to create two models: one for the server and one for GWT, as well as converting data from one to another. On the other hand, while I do not really like to use String instead of, say, javax.xml.datatype.Duration, I have to use BigDecimal on the server because of the calculations, which means either two models, or a conversion, or tons of tiny conversions in BigDecimal for each calculation.

+5
source share
3 answers

GWT java.math, :

http://code.google.com/p/gwt-java-math/

Apache Harmony, Java Script , longs.

BigInteger, BigDecimal, MathContext, RoundingMode Random.

+9

GWT 2.1 java.math.BigDecimal.
release-notes

+15

, gwt-math project, BigDecimal ...

, BigDecimal GWT.

+3

All Articles