Skip to content

pjfanning/jackson-module-enumeratum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)