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

I'm adding `ScalaObject` along with `ScalaObjectTest` to detect whether given `Class[_]` is a scala singleton object. I'm not sure if `clazz` can be a null but I'm adding `Option(clazz)` in...

```scala import com.fasterxml.jackson.databind.{ObjectMapper, SerializationFeature} import com.fasterxml.jackson.module.scala.DefaultScalaModule import com.fasterxml.jackson.databind.json.{JsonMapper} case class B(a: String, b: String) val mapper = JsonMapper.builder().addModule(DefaultScalaModule).build() mapper.writeValueAsString(B("a", "b")) // "{\"a\":\"a\",\"b\":\"b\"}" val s = mapper.writeValueAsString(List(B("a", "b"), B("c", "d"))) //...

Both `.class` and `.tasty` files are read at run time, e.g. **.class file access stack trace** ``` at java.lang.ClassLoader.getResource(ClassLoader.java:1395) at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1733) at com.thoughtworks.paranamer.BytecodeReadingParanamer.getClassAsStream(BytecodeReadingParanamer.java:131) at com.thoughtworks.paranamer.BytecodeReadingParanamer.getClassAsStream(BytecodeReadingParanamer.java:124) at com.thoughtworks.paranamer.BytecodeReadingParanamer.lookupParameterNames(BytecodeReadingParanamer.java:92) at com.thoughtworks.paranamer.CachingParanamer.lookupParameterNames(CachingParanamer.java:90) at...

This is open just for discussion. jackson-module-scala can serialize Iterators but will fail if you try to deserialize them. Noone has complained yet. Most users would use standard collections when...

In master (Jackson3), these tests need `disable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY)` These are the only tests that needs this added.

3.x

With 2.18 jackson-databind has a new, rewritten logic for POJO Property detection: work was done mostly under https://github.com/FasterXML/jackson-databind/issues/4515. Logic, at high-level, selects at most one "Properties-based" Creator (constructor / static...

This test fails in scala 2.11 and scala 3.3 with the follwoing error ``` com.fasterxml.jackson.databind.JsonMappingException: class com.fasterxml.jackson.module.scala.ser.AnyValSerializerTest$BigIntAnyVal cannot be cast to class java.lang.Number (com.fasterxml.jackson.module.scala.ser.AnyValSerializerTest$BigIntAnyVal is in unnamed module of loader...

https://github.com/FasterXML/jackson-module-scala/commit/20328f7f9a4305f742a1fb7e6c4c003a47cca18c ``` [info] - should use secondary constructor annotated with JsonCreator (Case Class) *** FAILED *** [info] tools.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized property "dummy" (class tools.jackson.module.scala.deser.CreatorTest$CaseClassAlternativeConstructor), not marked as ignorable (one known property:...

3.x

This method was added the AnotationIntrospector base class in jackson-databind 2.18 and returns null by default. From my testing, the declaredConstructors are what jackson-databind picks up via Java reflection and...

* test case that passes in jackson-module-scala 2.x * Have raised https://github.com/FasterXML/jackson-databind/pull/5198 to highlight the issue

3.x