You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that if useBigDecimals is set to true and a numeric field has default property set, the generated Java file has the field initialized with Double value instead of BigDecimal.
I think it might be better to use the String constructor of BigDecimal, since it avoids a multitude of numeric representation issues and will create a BigDecimal that matches number given in the JSON Schema exactly.
thachhoang
added a commit
to thachhoang/jsonschema2pojo
that referenced
this issue
Mar 29, 2016
It seems that if
useBigDecimals
is set to true and a numeric field hasdefault
property set, the generated Java file has the field initialized with Double value instead of BigDecimal.Json schema:
Java file:
This is my gradle configuration:
The text was updated successfully, but these errors were encountered: