The very first thing to do is to upgrade: Jackson 2.2 is a very old version, and has not been supported for a while. You may want to try version 2.7.5 to see whether this might resolve your issue.
-+ Tatu +- On Fri, Aug 5, 2016 at 11:01 AM, <[email protected]> wrote: > I am trying to deserialize this json: > > { "id" : 1, "attributes" : { "weight" : 120, "age": 20 } } > > Works well with this case class: > > case class Record(id: Int, attributes: Map[String, Int]) > > > However the data has an empty string when there are no attributes: > > {"id" : 2, "attributes" : ""} > > Deserialization fails with this message: > > Can not instantiate value of type scala.collection.immutable.Map from > String value (''); no single-String constructor/factory method > > > Please suggest how to get past this issue. The package version we use is: > > "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.2.2" > > > Thanks, > Anand. > > -- > You received this message because you are subscribed to the Google Groups > "jackson-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
