Class

com.twitter.finatra.jackson.ScalaObjectMapper

Builder

Related Doc: package ScalaObjectMapper

Permalink

case class Builder extends Product with Serializable

A Builder for creating a new ScalaObjectMapper. E.g., to build a new instance of a ScalaObjectMapper.

For example,

ScalaObjectMapper.builder
  .withPropertyNamingStrategy(new PropertyNamingStrategy.UpperCamelCaseStrategy)
  .withNumbersAsStrings(true)
  .withAdditionalJacksonModules(...)
  .objectMapper

or

val builder =
  ScalaObjectMapper.builder
    .withPropertyNamingStrategy(new PropertyNamingStrategy.UpperCamelCaseStrategy)
    .withNumbersAsStrings(true)
    .withAdditionalJacksonModules(...)

  val mapper = builder.objectMapper
  val camelCaseMapper = builder.camelCaseObjectMapper
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Builder
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val additionalJacksonModules: Seq[Module]

    Permalink
  5. val additionalMapperConfigurationFn: (ObjectMapper) ⇒ Unit

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. final def camelCaseObjectMapper: ScalaObjectMapper

    Permalink

    Creates a new ScalaObjectMapper explicitly configured with PropertyNamingStrategy.LOWER_CAMEL_CASE as a PropertyNamingStrategy.

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  9. val defaultJacksonModules: Seq[Module]

    Permalink
  10. val deserializationConfig: Map[DeserializationFeature, Boolean]

    Permalink
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  13. val injectableTypes: InjectableTypes

    Permalink
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def jacksonScalaObjectMapper(injector: Injector, underlying: JacksonScalaObjectMapperType): JacksonScalaObjectMapperType

    Permalink

    Return a mutated instance of the given JacksonScalaObjectMapperType configured with the given (nullable) Injector.

    Return a mutated instance of the given JacksonScalaObjectMapperType configured with the given (nullable) Injector.

    injector

    a configured (nullable) Injector.

    underlying

    the JacksonScalaObjectMapperType instance to use a basis for configuration.

    returns

    the updated JacksonScalaObjectMapperType.

  16. final def jacksonScalaObjectMapper(injector: Injector): JacksonScalaObjectMapperType

    Permalink

    Create a new JacksonScalaObjectMapperType from this Builder with the given (nullable) Injector.

    Create a new JacksonScalaObjectMapperType from this Builder with the given (nullable) Injector.

    injector

    a configured (nullable) Injector.

    returns

    a new JacksonScalaObjectMapperType instance configured from this Builder.

  17. final def jacksonScalaObjectMapper: JacksonScalaObjectMapperType

    Permalink

    Create a new JacksonScalaObjectMapperType from this Builder.

  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  21. val numbersAsStrings: Boolean

    Permalink
  22. final def objectMapper(injector: Injector, underlying: JacksonScalaObjectMapperType): ScalaObjectMapper

    Permalink

    Create a new ScalaObjectMapper from this Builder with the given (nullable) Injector

    Create a new ScalaObjectMapper from this Builder with the given (nullable) Injector

    injector

    a configured (nullable) Injector.

    underlying

    the JacksonScalaObjectMapperType to wrap.

    returns

    a new ScalaObjectMapper instance.

  23. final def objectMapper(injector: Injector): ScalaObjectMapper

    Permalink

    Create a new ScalaObjectMapper from this Builder with the given (nullable) Injector.

    Create a new ScalaObjectMapper from this Builder with the given (nullable) Injector.

    injector

    a configured (nullable) Injector.

    returns

    a new ScalaObjectMapper instance configured from this Builder.

  24. final def objectMapper: ScalaObjectMapper

    Permalink

    Create a new ScalaObjectMapper from this Builder.

  25. val propertyNamingStrategy: PropertyNamingStrategy

    Permalink
  26. val serializationConfig: Map[SerializationFeature, Boolean]

    Permalink
  27. val serializationInclude: Include

    Permalink
  28. final def snakeCaseObjectMapper: ScalaObjectMapper

    Permalink

    Creates a new ScalaObjectMapper explicitly configured with PropertyNamingStrategy.SNAKE_CASE as a PropertyNamingStrategy.

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. val validation: Boolean

    Permalink
  31. val validator: Option[Validator]

    Permalink
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def withAdditionalJacksonModules(additionalJacksonModules: Seq[Module]): Builder

    Permalink

    Configure the list of additional Jackson Modules for this Builder.

    Configure the list of additional Jackson Modules for this Builder.

    Note

    this will overwrite (not append) the list additional Jackson Modules of this Builder.

  36. final def withAdditionalMapperConfigurationFn(mapperFn: (ObjectMapper) ⇒ Unit): Builder

    Permalink

    Configure additional JacksonObjectMapper functionality for the underlying mapper of this Builder.

    Configure additional JacksonObjectMapper functionality for the underlying mapper of this Builder.

    Note

    this will overwrite any previously set function.

  37. final def withDeserializationConfig(deserializationConfig: Map[DeserializationFeature, Boolean]): Builder

    Permalink

    Set the deserialization configuration for this Builder as a Map of DeserializationFeature to Boolean (enabled).

    Set the deserialization configuration for this Builder as a Map of DeserializationFeature to Boolean (enabled).

    Note

    the default is described by ScalaObjectMapper.DefaultDeserializationConfig.

    ,

    this overwrites the default deserialization configuration of this Builder.

    See also

    ScalaObjectMapper.DefaultDeserializationConfig

  38. final def withInjectableTypes(injectableTypes: InjectableTypes): Builder

    Permalink

    Configure an InjectableTypes for this Builder.

    Configure an InjectableTypes for this Builder.

    Note

    the default is a NullInjectableTypes

    See also

    ScalaObjectMapper.DefaultInjectableTypes

  39. final def withNoValidation: Builder

    Permalink

    Disable case class validation during case class deserialization

    Disable case class validation during case class deserialization

    Note

    If you pass withNoValidation to the builder all case class validations will be bypassed, regardless of the withValidator configuration.

    See also

    ScalaObjectMapper.DefaultValidation

  40. final def withNumbersAsStrings(numbersAsStrings: Boolean): Builder

    Permalink

    Enable the Feature.WRITE_NUMBERS_AS_STRINGS for this Builder.

    Enable the Feature.WRITE_NUMBERS_AS_STRINGS for this Builder.

    Note

    the default is false.

  41. final def withPropertyNamingStrategy(propertyNamingStrategy: PropertyNamingStrategy): Builder

    Permalink

    Configure a PropertyNamingStrategy for this Builder.

    Configure a PropertyNamingStrategy for this Builder.

    Note

    the default is PropertyNamingStrategy.SNAKE_CASE

    See also

    ScalaObjectMapper.DefaultPropertyNamingStrategy

  42. final def withSerializationConfig(serializationConfig: Map[SerializationFeature, Boolean]): Builder

    Permalink

    Set the serialization configuration for this Builder as a Map of SerializationFeature to Boolean (enabled).

    Set the serialization configuration for this Builder as a Map of SerializationFeature to Boolean (enabled).

    Note

    the default is described by ScalaObjectMapper.DefaultSerializationConfig.

    See also

    ScalaObjectMapper.DefaultSerializationConfig

  43. final def withSerializationInclude(serializationInclude: Include): Builder

    Permalink

    Configure a JsonInclude.Include for serialization for this Builder.

    Configure a JsonInclude.Include for serialization for this Builder.

    Note

    the default is JsonInclude.Include.NON_ABSENT

    See also

    ScalaObjectMapper.DefaultSerializationInclude

  44. final def withValidator(validator: Validator): Builder

    Permalink

    Configure a Validator for this Builder

    Configure a Validator for this Builder

    Note

    If you pass withNoValidation to the builder all case class validations will be bypassed, regardless of the withValidator configuration.

    See also

    ScalaObjectMapper.DefaultValidator

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped