As requested in FasterXML/jackson-module-scala#65, and discussed in this thread. This would take the form of:
- A BaseSettings property that specifies the default radix for Number-to-String conversion. Defaults to 10.
- A 'radix' parameter added to JsonFormat
that overrides the default radix, if the shape is STRING
- [optionally] A serialization feature to control whether numeric values are output as JSON numbers or JSON strings by default.
Another component of the request is to provide a way that instances of a certain type, for example BigInteger
, could be serialized as strings of a certain radix. I would think that a Mix-In annotation on the type would be the simplest end-user interface for this, but I don't know if Jackson will recognize @JsonFormat
at the class level, or recognize mix-in annotations for built-in types.
Comment From: monperrus
That feature would be great!
Comment From: cowtowncoder
This should probably work with @JsonFormat(pattern=...
) annotation, if formatted number output was supported -- I think there may be another issue for this.
Comment From: cowtowncoder
This is free for any to work on, @tiger9800! So feel free to.