castor-data-binding / castor

http://castor-data-binding.github.io/castor/
35 stars 29 forks source link

BigDecimal will serialize with exponential notation #65

Open jenswessling opened 7 years ago

jenswessling commented 7 years ago

Masrhaller.java line 1766 does an obj.toString() when marshalling a BigDecimal. it should probably be doing something similar to lines 1814-1818 and call convertBigDecimalToString if it's a BigDecimal.

jenswessling commented 7 years ago

As an additional note. Castor will validate fine with exponential notation for decimal values, but most other validators (correctly) don't like it.