I'm using a case class which - among other parameters - is instantiated with a BigInt hexadecimal value. I use this case class to deserialize JSON messages via Jerkson/Jackson. The beauty of using Jackson is that the de/serialization works out-of-the-box for case classes based on their signature (I guess).
Now, a BigInt value in hexadecimal encoding would need to be instantiated with an additional radix parameter: BigInt(hexValue, 16). However my JSON messages don't contain such parameter. I'm looking for a solution to define this radix within my case class' definition so that Jackson would continue be able to use the class without configuration. Something like:
case class MyClass(name: String, hexValue: BigInt(hexValue, 16))
I understand that alternative approaches would be to a) define the JSON de/serialization explicitly or to b) define my own wrapper class around BigInt. However I'm looking for a more elegant and "scala-ish" solution - if there is any.
Note: Int is not sufficient, it has to be BigInt.