Support #5199
decimal - get value
100%
History
#1 Updated by Marian Edu over 5 years ago
Trying to get the JSON serialization as close as possible to the 4GL one I see for decimal data type the conversion is using a BigDecimal but it does that by messing with numeric locales and string representation while the decimal object already have the BigDecimal value right there... it's just not possible to access it, for whatever reason the getValue method returns the double value hence lost of precision is most likely to occur.
Is there a reason for this, the method doesn't seem to be used anywhere so would it be possible to just change that to return the actual BigDecimal value instead?
#2 Updated by Constantin Asofiei over 5 years ago
There is the decimal.toBigDecimal() if you want to get the BigDecimal instance.
#3 Updated by Marian Edu over 5 years ago
Constantin Asofiei wrote:
There is the
decimal.toBigDecimal()if you want to get theBigDecimalinstance.
Thanks a bunch, for whatever reason was only looking at getter methods :(
#4 Updated by Greg Shah over 5 years ago
- % Done changed from 0 to 100
- Assignee set to Constantin Asofiei
- Status changed from New to Closed