Closed giiita closed 6 years ago
@giiita thanks for the issue.
I think this is covered in https://github.com/twitter/finatra/issues/442. Finatra is not expected to work with any Jackson version other what is specified in the Finatra build.sbt
(as of this writing, 2.8.4). Using a different Jackson version with Finatra will cause failures or undefined behavior.
The solution? Please specify the necessary version of Jackson.
Thanks!
Depending on the version of jackson-core, it can not be converted to request parameter class.
Expected behavior
For example,
finatra-http_18.4.0
depends onjackson-core_2.8.4
. At this time,FinatraCaseClassDeserializer.deserializeNonWrapperClass
'sval jsonNode = jp.readValueAsTree[JsonNode]
returnsnull
.However, when unintentionally defined
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.9.4"
,val jsonNode = jp.readValueAsTree[JsonNode]
returns{}
.The Deserializer will now accept the empty request and misunderstand it.
Steps to reproduce the behavior
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.9.4"