Package com.hpe.caf.codec
Class ObjectMapperFactory
- java.lang.Object
-
- com.hpe.caf.codec.ObjectMapperFactory
-
public final class ObjectMapperFactory extends Object
Provides pre-configured strict and lenient Jackson JSON ObjectMapper instances.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.fasterxml.jackson.databind.ObjectMappergetLenientMapper()static com.fasterxml.jackson.databind.ObjectMappergetStrictMapper()
-
-
-
Method Detail
-
getStrictMapper
public static com.fasterxml.jackson.databind.ObjectMapper getStrictMapper()
- Returns:
- an ObjectMapper which fails on unknown properties, does not accept null for primitives, or duplicates
-
getLenientMapper
public static com.fasterxml.jackson.databind.ObjectMapper getLenientMapper()
- Returns:
- an ObjectMapper which ignores unknown properties, uses defaults in case of null for primitive, and accepts duplicates
-
-