Hi Everyone,

I have written a custom deserializer for my application. My api spec has 
"Balance" field and it is defined as double. But when I return this from my 
api using jackson 2.9.0 I want 25000 to be returned as 25000.00 and 
likewise for all output.

I am able to achieve this using :
jgen.writeString(output);

But this will make it a String i.e:

"Balance": "25000.00"

When I use 
jgen.writeNumber(output);
It removes the insignificant 0.

I want the output to be like:

"Balance": 25000.00

Can anyone confirm if this is a limitation in Jackson, or if this is not 
then how can I format my output to 2 decimal places?

Thank You,
Ashwini

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to