Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 583 Bytes

README.md

File metadata and controls

27 lines (22 loc) · 583 Bytes

JacksonListWrapper

This is a module for jackson enabling serialization and deserialization of ListWrapper Instances.

Example:

ListWrapper("customValues", listOf("Hello", "World")

When serializing this object the resulting Json looks like:

{
  "customValues": [
    "Hello", 
    "World"
  ]
}

Usage

To use the custom de-/serializer you need to register the Module with the jackson object mapper

val objectMapper = ObjectMapper()
// register other modules like the kotlin module...
objectMapper.registerModule(ListWrapperModule())