Integer keys when serializing a POJO to CBOR with Jackson
I'm writing a Kotlin program (though there's nothing Kotlin-specific here, so Java-based answers are also welcome) that needs to communicate using a CBOR-based protocol. That protocol uses integers as field names to save space, and changing the protocol is not an option.
A simple example:
package com.example.cbortest
import com.fasterxml.jackson.dataformat.cbor.databind.CBORMapper
import java.util.*
class CBORTest(
val str: String
)
fun main() {
val testObj = CBORTest("Hello")...