Bad encoding of Option in scala 2.12
gffuma opened this issue · comments
Giovanni Fumagalli commented
Encoding an Option
of a case class with a field Option[Map]
fails on scala 2.12
import io.circe._, io.circe.generic.auto._, io.circe.parser._, io.circe.syntax._
case class A(
m: Option[Map[String, String]],
)
val x = Option(A(m=None))
println(x.asJson.noSpaces)
On scala 2.12:
{"m":[]}
On scala 2.13 is ok:
{ "m": null }
Miles Possing commented
Did you ever get to the bottom of this? I'm experiencing exactly this behavior as well