You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by tonywestonuk <to...@totspics.com> on 2016/10/16 16:08:58 UTC

Johnzon send longs/ints as strings

Hi,
Is it possible to configure Johnzon to surround numbers with quotes?

The reason is I have huge numbers.... and Javascript rounds huge numbers to
fit a float. I would rather they just be sent as strings.

Thanks.




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Johnzon-send-longs-ints-as-strings-tp4680330.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Johnzon send longs/ints as strings

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

first of all it is a question for johnzon list, not tomee

then on the issue, it depends your model. Easiest being to use BigDecimal
or string directly but you can also reuse an adapter/converter to do it.
However take care what you ask is not really symmetric and you can get
issue sending back your payload if you don't fix the model as mentionned as
"easiest" solution.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Wordpress Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-10-16 18:08 GMT+02:00 tonywestonuk <to...@totspics.com>:

> Hi,
> Is it possible to configure Johnzon to surround numbers with quotes?
>
> The reason is I have huge numbers.... and Javascript rounds huge numbers to
> fit a float. I would rather they just be sent as strings.
>
> Thanks.
>
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Johnzon-send-longs-ints-as-strings-tp4680330.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>