thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jools <jool...@gmail.com>
Subject Re: Representing a BigDecimal
Date Thu, 07 Apr 2011 19:32:48 GMT
Hi Brian,

A BigDecimal can take a string as a constructor, and has a toPlainString()
method which returns a string.

So, you can either use a 'binary' datatype or a plain old 'string' type.

Cheers,

--Jools

On 7 April 2011 18:25, Brian Fitzpatrick <brian.fitzpatrick@acm.org> wrote:

> Is there a recommended way to represent a BigDecimal (java) datatype in
> thrift?  It is for a monetary value, so a double would not be appropriate.
> I
> could use a string and convert back and forth, but was looking to see how
> others had implemented this datatype.
>
> Thanks,
> Brian
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message