A library to help with serialization and deserialization using com.fasterxml.jackson.
This is a single point of configuration for our projects.
Contains a pre-configured JSON-mapper and a builder for it.
Allows DateTime-type serialization and deserialization using ISO8601.
Ignores unknown properties when deserializing.
Ignores null-values when serializing.
Contains fix for Project Lomboks fluent- and chained accessors.
JsonMapper mapper = JsonMapper.create();
// JSON to string.
ChildJson j = ChildJson.builder()
.id(2L)
.createdOn(localDateTime)
.editedOn(localDateTime)
.string("test")
.build();
String result = mapper.toStringFrom(j);
// String to JSON.
String input = "{\"string\":\"gluppy\",\"blah\":\"platy\"}";
SimpleJson json = mapper.fromStringTo(SimpleJson.class, input);