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 PropertyNamingStrategies.UpperCamelCaseStrategy) .withNumbersAsStrings(true) .withAdditionalJacksonModules(...) .objectMapper
or
val builder = ScalaObjectMapper.builder .withPropertyNamingStrategy(new PropertyNamingStrategies.UpperCamelCaseStrategy) .withNumbersAsStrings(true) .withAdditionalJacksonModules(...) val mapper = builder.objectMapper val camelCaseMapper = builder.camelCaseObjectMapper
- Alphabetic
- By Inheritance
- Builder
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val additionalJacksonModules: Seq[Module]
- val additionalMapperConfigurationFns: Seq[(ObjectMapper) ⇒ Unit]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
final
def
camelCaseObjectMapper: ScalaObjectMapper
Creates a new ScalaObjectMapper explicitly configured with PropertyNamingStrategies.LOWER_CAMEL_CASE as a
PropertyNamingStrategy. -
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- val defaultJacksonModules: Seq[Module]
- val deserializationConfig: Map[DeserializationFeature, Boolean]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val numbersAsStrings: Boolean
-
final
def
objectMapper[F <: JsonFactory](factory: F): ScalaObjectMapper
Create a new ScalaObjectMapper from this Builder using the given JsonFactory.
-
final
def
objectMapper: ScalaObjectMapper
Create a new ScalaObjectMapper from this Builder.
- val propertyNamingStrategy: PropertyNamingStrategy
- val serializationConfig: Map[SerializationFeature, Boolean]
- val serializationInclude: Include
-
final
def
snakeCaseObjectMapper: ScalaObjectMapper
Creates a new ScalaObjectMapper explicitly configured with PropertyNamingStrategies.SNAKE_CASE as a
PropertyNamingStrategy. -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val validation: Boolean
- val validator: Option[ScalaValidator]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
withAdditionalJacksonModules(additionalJacksonModules: Seq[Module]): Builder
Configure the list of additional Jackson Modules for this Builder.
-
final
def
withAdditionalMapperConfigurationFn(mapperFn: (ObjectMapper) ⇒ Unit): Builder
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.
-
final
def
withDeserializationConfig(deserializationConfig: Map[DeserializationFeature, Boolean]): Builder
Set the deserialization configuration for this Builder as a
MapofDeserializationFeaturetoBoolean(enabled).Set the deserialization configuration for this Builder as a
MapofDeserializationFeaturetoBoolean(enabled).- Note
this overwrites the default deserialization configuration of this Builder.
,the default is described by ScalaObjectMapper.DefaultDeserializationConfig.
- See also
ScalaObjectMapper.DefaultDeserializationConfig
-
final
def
withNoValidation: Builder
Disable case class validation during case class deserialization
Disable case class validation during case class deserialization
- Note
If you pass
withNoValidationto the builder all case class validations will be bypassed, regardless of thewithValidatorconfiguration.- See also
ScalaObjectMapper.DefaultValidation
-
final
def
withNumbersAsStrings(numbersAsStrings: Boolean): Builder
Enable the JsonWriteFeature.WRITE_NUMBERS_AS_STRINGS for this Builder.
Enable the JsonWriteFeature.WRITE_NUMBERS_AS_STRINGS for this Builder.
- Note
the default is false.
-
final
def
withPropertyNamingStrategy(propertyNamingStrategy: PropertyNamingStrategy): Builder
Configure a PropertyNamingStrategy for this Builder.
Configure a PropertyNamingStrategy for this Builder.
- Note
the default is PropertyNamingStrategies.SNAKE_CASE
- See also
ScalaObjectMapper.DefaultPropertyNamingStrategy
-
final
def
withSerializationConfig(serializationConfig: Map[SerializationFeature, Boolean]): Builder
Set the serialization configuration for this Builder as a
MapofSerializationFeaturetoBoolean(enabled).Set the serialization configuration for this Builder as a
MapofSerializationFeaturetoBoolean(enabled).- Note
the default is described by ScalaObjectMapper.DefaultSerializationConfig.
- See also
ScalaObjectMapper.DefaultSerializationConfig
-
final
def
withSerializationInclude(serializationInclude: Include): Builder
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
-
final
def
withValidator(validator: ScalaValidator): Builder
Configure a ScalaValidator for this Builder
Configure a ScalaValidator for this Builder
- Note
If you pass
withNoValidationto the builder all case class validations will be bypassed, regardless of thewithValidatorconfiguration.- See also
ScalaObjectMapper.DefaultValidator
-
final
def
yamlObjectMapper: ScalaObjectMapper
Create a new ScalaObjectMapper explicitly configured to serialize and deserialize YAML from this Builder.
Create a new ScalaObjectMapper explicitly configured to serialize and deserialize YAML from this Builder.
- Note
the used PropertyNamingStrategy is defined by the current Builder configuration.