Class ObjectMapperFactory
java.lang.Object
com.github.cafapi.common.codecs.json.ObjectMapperFactory
Provides pre-configured strict and lenient Jackson JSON ObjectMapper instances.
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.fasterxml.jackson.databind.ObjectMapper
static com.fasterxml.jackson.databind.ObjectMapper
-
Method Details
-
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
-