So I’m working with an API that represents money a...
# serialization
t
So I’m working with an API that represents money as a decimal number in JSON, e.g.
"amount":10.99
. How would i serialize a
BigDecimal
or
String
representation to a JSON number without any intermediate conversion to a floating point number?
j
in ethereum amounts are bigint (really bigint) with a decimal specifier seperate
t
@sandwwraith Is this supported? What should almost work is to just encode it as a string, and set the
unquoted
flag to true in
JsonConfiguration
. However I still want the key to be quoted, so that’s a problem.
j
as this appears to be moving from a question of "how" to a question of what is supported, the last word "problem", may be best addressed in issue tracking.
s
Well, I don't think that ability to disable quoting for arbitary values alone is supported now, so it's better to submit this feature-request to tracker
👍 1