jackson-module-enumeratum

Build Status Maven Central

Enumeratum support for Jackson

libraryDependencies += "com.github.pjfanning" %% "jackson-module-enumeratum" % "2.17.1"
  val mapper = JsonMapper.builder().addModule(DefaultScalaModule).addModule(EnumeratumModule).build()
  val car = Car("Volga", Color.Blue)
  val json = mapper.writeValueAsString(car)
  mapper.readValue(json, classOf[Car]) shouldEqual(car)