|
|
|
@ -11,6 +11,7 @@ import com.fasterxml.jackson.databind.ObjectMapper.DefaultTypeResolverBuilder;
|
|
|
|
|
import com.fasterxml.jackson.annotation.*;
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
|
|
|
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
|
|
|
|
import com.fasterxml.jackson.databind.MapperFeature;
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper.DefaultTyping;
|
|
|
|
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
|
|
|
@ -25,6 +26,7 @@ public class JsonCodec extends RedisCodec<Object, Object> {
|
|
|
|
|
objectMapper.setSerializationInclusion(Include.NON_NULL);
|
|
|
|
|
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
|
|
|
|
objectMapper.configure(SerializationFeature.WRITE_BIGDECIMAL_AS_PLAIN, true);
|
|
|
|
|
objectMapper.configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, true);
|
|
|
|
|
|
|
|
|
|
// type info inclusion
|
|
|
|
|
TypeResolverBuilder<?> typer = new DefaultTypeResolverBuilder(DefaultTyping.NON_FINAL);
|
|
|
|
|