BigDecimal serialization in GWT
Posted
by Domchi
on Stack Overflow
See other posts from Stack Overflow
or by Domchi
Published on 2009-10-29T18:30:59Z
Indexed on
2010/05/27
2:51 UTC
Read the original article
Hit count: 431
What is your preferred approach to serializing BigDecimal in GWT?
Are there any clever workarounds, or do you simply use Double or String?
Of all of the GWT pains this is so far the biggest; I'd hate to create two models, one for server and one for GWT, and transform data from one to the other. On the other hand, while I don't care much about using 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 and conversion, or tons of tiny conversions to BigDecimal for every calculation.
© Stack Overflow or respective owner