score:0
Accepted answer
following up from the comments
define a custom objectmappermodule
class camelcasemodule extends scalaobjectmappermodule {
override val propertynamingstrategy: propertynamingstrategy =
new propertynamingstrategy.uppercamelcasestrategy
override def additionalmapperconfiguration(mapper: objectmapper): unit = {
mapper.configure(deserializationfeature.fail_on_unknown_properties, true)
}
}
override the default jackson module for your server
override def jacksonmodule = new camelcasemodule
make sure you have
"com.twitter" %% "finatra-jackson" % yourfinatraversion % "test"
in your build.sbt
and that you import
import com.fasterxml.jackson.databind.{deserializationfeature, module, objectmapper, propertynamingstrategy}
import com.twitter.finatra.jackson.modules.scalaobjectmappermodule
tested it locally and it seems to work hope this helps
Source: stackoverflow.com
Related Query
- how to set response with camelCase in finatra
- How to implement a Set with a user-defined equality
- How to concretely set abstract type with type bound?
- How do I run the Spark decision tree with a categorical feature set using Scala?
- akka-http: How to set response headers
- How to set only the preferred width of Panel with flow layout?
- How do I set up jsr223 scripting with scala as scripting language
- How to set up play framework ApplicationLoader and Macwire to work with custom routes?
- How to set the maximum content length with akka's http client?
- How to set encrypted password to credentials to publish Nexus OSS with sbt?
- How to use OutputStreams with chunked response in Play 2.1
- How do you make sbt `test` equivalent to a run command with some set of options?
- How do I make the default response Content-type: application/json with Scalatra
- How to read response as Observable[String] with sttp
- how to set form value with external select value
- How can I loop though a set and reassign every item in collection with new value?
- How to convert Tuples to Map with Set in Scala
- How to set resource requirements on a container with the fabric8 kubernetes Java & Scala client API
- How to set up multi-module build with reference to external local sbt project?
- How do I set up Play Framework 2.0 in Netbeans with Scala IDE
- How to set a cookie with Play 2.1/Scala?
- How to set up a Redshift connection with Slick?
- How to stream Anorm large query results to client in chunked response with Play 2.5
- Akka Http Server - How to have route respond with byte array binary response
- How to set the type of array with dataset in spark scala
- How to set the Docker Registry with sbt-native-packager
- How to set an empty struct with all fields null, null in spark
- How to set environment variables when executing a scenario with maven?
- How to set up SSL with a TCP client in Akka 2.4.6?
- How do you set the viewport, width, with phantomjs with play 2 framework
More Query from same tag
- Type overriding for parametrized method in scala
- How to override a TypeLiteral in Scala Guice when testing
- How to compile and run Scala code programmatically
- Spark writing compressed CSV with custom path to S3
- Scala Play Framework - getting "cannot enqueue after timer shutdown" error when running tests that involve Akka
- Scala weird map function behaviour
- PlayFramework Scala: How to get default Hikaricp connection
- How to create stand-alone lift web application?
- How to flatten a nested tuple?
- dynamically call dataframe functions based on value
- how to extend (or proxy) a scala class with private constructor
- Implicit conversion to supertype using type classes
- Condition on rows content of dataframe in Spark scala
- Different ways of Currying
- Why Akka streams cycle doesn't end in this graph?
- Accessing example arrays in step definition
- Book: Scala in Depth, def foo[M[_]](f : M[Int]) = f, is _ really an existential type here?
- Wrong type inference [Nothing]
- Scala: Generics For Return Type Seq[A] or Future[Seq[A]]
- Difference between [ ] and ( ) to create new Scala objects
- How to split column into multiple rows using Spark JavaRDD
- check if delta table exists on a path or not in databricks
- How to check whether an integer is present in the range in Scala?
- Scala XML Omit Closing Tag
- Strange bug with INT/LONG conversion when using Spark GraphX
- extracting keys from json string using json4s
- spark kafka producer serializable
- Methods ready and result of Future in Scala cannot be called directly
- Wait on asynchronous Future call before processing next message in Akka
- Spark job slow on cluster than standalone