Class ObjectMapperFactory

java.lang.Object
com.github.cafapi.common.codecs.jsonlzf.ObjectMapperFactory

public final class ObjectMapperFactory extends Object
Provides pre-configured strict and lenient Jackson JSON ObjectMapper instances.
  • 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