A Builder for creating a new ScalaObjectMapper.
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
Creates a new ScalaObjectMapper with the given Injector wrapping an underlying JacksonScalaObjectMapperType.
Creates a new ScalaObjectMapper with the given Injector wrapping an underlying JacksonScalaObjectMapperType.
a configured (nullable) Injector.
the JacksonScalaObjectMapperType to wrap.
a new ScalaObjectMapper
the given Injector can be null.
Creates a new ScalaObjectMapper wrapping an underlying JacksonScalaObjectMapperType.
Creates a new ScalaObjectMapper wrapping an underlying JacksonScalaObjectMapperType.
the JacksonScalaObjectMapperType to wrap.
a new ScalaObjectMapper
When not using injection, this factory method can be used but be aware that only default com.fasterxml.jackson.databind.InjectableValues are supported via this instantiation when given a non-null com.google.inject.Injector.
When not using injection, this factory method can be used but be aware that only
default com.fasterxml.jackson.databind.InjectableValues are supported via this
instantiation when given a non-null com.google.inject.Injector. By default only
com.fasterxml.jackson.databind.InjectableValues provided by the object graph
is supported during deserialization (case class fields annotated with @Inject
).
a configured (nullable) Injector.
a new ScalaObjectMapper instance.
the preferred way of obtaining a ScalaObjectMapper is through injection
using the FinatraJacksonModule
.
com.fasterxml.jackson.databind.InjectableValues
When not using injection, this factory method can be used.
When not using injection, this factory method can be used. Use of this method will NOT configure the underlying mapper for supporting com.fasterxml.jackson.databind.InjectableValues provided by the object graph. To configure the ability to "inject" values during deserialization which come from the object graph a non-null Injector is required, please see: Injector).
a new ScalaObjectMapper instance.
the preferred way of obtaining a ScalaObjectMapper is through injection using
the ScalaObjectMapperModule
.
com.fasterxml.jackson.databind.InjectableValues
Injector)
Build a new instance of a ScalaObjectMapper.
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
Utility to create a new ScalaObjectMapper explicitly configured with
PropertyNamingStrategy.LOWER_CAMEL_CASE as a PropertyNamingStrategy
wrapping the
given JacksonScalaObjectMapperType.
Utility to create a new ScalaObjectMapper explicitly configured with
PropertyNamingStrategy.LOWER_CAMEL_CASE as a PropertyNamingStrategy
wrapping the
given JacksonScalaObjectMapperType.
the underlying
mapper is copied (not mutated) to produce the new ScalaObjectMapper
with a PropertyNamingStrategy.LOWER_CAMEL_CASE PropertyNamingStrategy.
Utility to create a new ScalaObjectMapper explicitly configured with
PropertyNamingStrategy.SNAKE_CASE as a PropertyNamingStrategy
wrapping the
given JacksonScalaObjectMapperType.
Utility to create a new ScalaObjectMapper explicitly configured with
PropertyNamingStrategy.SNAKE_CASE as a PropertyNamingStrategy
wrapping the
given JacksonScalaObjectMapperType.
the underlying
mapper is copied (not mutated) to produce the new ScalaObjectMapper
with a PropertyNamingStrategy.SNAKE_CASE PropertyNamingStrategy.