users@jersey.java.net

[Jersey] Re: Encoding longs ...

From: Brian Mason <brian_at_gabey.com>
Date: Mon, 8 Jul 2013 14:10:52 -0700

Thanks,
Is there a way to automate a runtime conversion of longs to Big Decimals
or is that just something I should have coded up when I did the coding???

Brian


On Mon, Jul 8, 2013 at 12:27 PM, Tatu Saloranta <tsaloranta_at_gmail.com>wrote:

> Usually lossless handling is achieved best by using `BigDecimal` for
> values.
> Jackson-based "POJO" mapping will handle this fine; although best
> practices suggest you should send this as part of an Object, as root-level
> values are not officially legal JSON.
>
> -+ Tatu +-
>
>
>
> On Mon, Jul 8, 2013 at 9:54 AM, Brian Mason <brian_at_gabey.com> wrote:
>
>> I am still on 1.17
>> I am using "Natural" encoding but I want to override the long encoding to
>> make it a string so we dont loose digits when its encoded to JSON.
>> Any suggestions on how to do this (Or a better idea of how to do this?)
>>
>> Thanks,
>> Brian Mason
>>
>
>