Version Matrix

jackson-module-scala3-enum

Build Status Maven Central

Jackson support for Scala3 enums.

libraryDependencies += "com.fasterxml.jackson.module" %% "jackson-module-scala3-enum" % "2.12.0"
import com.github.pjfanning.`enum`.EnumModule

val mapper = JsonMapper.builder()
  .addModule(DefaultScalaModule)
  .addModule(EnumModule)
  .build()

//old approach - will not work in Jackson 3
val mapper = new ObjectMapper()
mapper.registerModule(DefaultScalaModule)
mapper.registerModule(EnumModule)