jackson-module-scala icon indicating copy to clipboard operation
jackson-module-scala copied to clipboard

Add-on module for Jackson (https://github.com/FasterXML/jackson) to support Scala-specific datatypes

Results 62 jackson-module-scala issues
Sort by recently updated
recently updated
newest added

Fixes #451 for the cases when you have mix of old clients with 2.9.x and want to onboard gradually to 2.11.x ## Root causes 1. Missing $init$ in deprecated interfaces...

* https://github.com/FasterXML/jackson-module-scala/issues/468 recently fix for Iterables and Iterators * the existing Scala Map code converts to a Java Map so it can reuse the pre-existing Java serializer

The following code works as expected ```scala import com.fasterxml.jackson.annotation.{JsonSubTypes, JsonTypeInfo} import com.fasterxml.jackson.databind.ObjectMapper import com.fasterxml.jackson.module.scala.DefaultScalaModule @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonSubTypes(Array( new JsonSubTypes.Type(value = classOf[Ingredient.Meat], name =...

scala> case class A(s: String) extends AnyVal defined class A scala> case class B(a: A) defined class B scala> objectMapper.writeValueAsString(B(A("foo"))) res1: String = {"a":"foo"} scala> objectMapper.readValue(res1, classOf[B]) res2: B =...

I'm trying to serialize and deserialize an abstract class that has a type parameter, but the deserialization isn't working. Instead of deserializing the JSON into an object of the type...

I get this exception: `Can not construct instance of scala.util.Try, problem: abstract types either need to be mapped to concrete types, have custom deserializer`

We are using jackson 2.9.8. Sometimes (we couldn't find any consistent case) it ignore option (like scala module is unaware of option and just writing a json like this: `{"x":1,"empty":false,"defined":true}`...

need-test

I have a sample test here: ``` "Anyvals" should "serialize json" in { val groups = (0 until 10).map(_ => AnyHolder( Some(TestAny("data")) )) val objectMapper = new ObjectMapper().registerModule(DefaultScalaModule) println(objectMapper.writeValueAsString(data)) }...

Please see http://stackoverflow.com/questions/19379967/strange-deserializing-problems-with-generic-types-using-scala-and-jackson-and-ja for details. Shouldn't be the scala "primitive types" be auto converted from Strings?

Scala Reflection

Deserialization fails in an unexpected way in following code. No exception is thrown, however `from` field of `Container` is deserialized as `Map` instead of `XY`, the program outputs: > Container(Map(x...