I’d like to adopt jsoniter, a wonderful JSON serailizer lib for Scala. I’m using Scala 3.
The only stopper is that I need to serialize this:
Map[String, Any]
Where Any
is a class where a given codec is available, like e.g. String
, Date
, Int
, ….
Maybe the solution could be writing a custom codec, and I need probably to use reflection. But I don’t know how to start. I’ve seen the generated codec for a Map[String, Int]
.
Or perhaps it could be easier with another JSON scala parser lib.
I know that json4s can handle it with Scala 2, but it is buggy in Scala 3. It uses reflection.