Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 1.9 KB

README.md

File metadata and controls

18 lines (12 loc) · 1.9 KB

ip-jackson-databind

Maven Central Build Status Quality Gate Status Coverage Known Vulnerabilities

Provides support for serializing and deserializing IP addresses and ranges using Jackson. All you need to do is register a module. This can be done in two ways:

  1. Using ObjectMapper.registerModule:

     mapper.registerModule(IPModule.instance());
    
  2. Using ObjectMapper.findAndRegisterModules(). This will register not just an instance of IPModule, but any other module that's made available through the Service Provider Interface (SPI) mechanism:

     mapper.findAndRegisterModules();
    

No matter which way you choose, it will automatically allow all instances of IPAddress, IPRange and Subnet to be serialized and deserialized, without the need for any custom serializer or deserializer.