-
-
Notifications
You must be signed in to change notification settings - Fork 143
Description
(note: follow-up for FasterXML/jackson-dataformat-smile#16)
Since Scala has its own variants of JDK's BigDecimal
and BigInteger
, there is need to add explicit serializers/deserializers for these types. Some level of support does exist already when using JSON, since Number
values can be serialized by fallback writeNumber(String)
method; however, this does not work with all backend, and specifically won't work with binary formats like Smile
.
I am guessing that it should be relatively easy to do something like construct Java equivalents for serialization, and then call JsonGenerator.writeNumber(...)
method with native type. And on deserialization side, reverse should be possible as well.
Care should be taken to allow coercion from String value, similar to how JDK values are handled. It may be best to basically port over existing BigDecimal
/BigInteger
handlers to Scala moduler, for Scala types.