We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.7.0-M11
2.13.12
11
(main article: https://stackoverflow.com/questions/77970715/in-json4s-jackson-with-scala-2-fieldserializer-doesnt-compose-well-with-jsona)
Here is a short example:
class FieldOnly extends Sup { val a: String = "" @JsonAlias(Array("bb", "bbb")) val b: Option[Int] = None } implicit val formats: Formats = DefaultFormats + FieldSerializer[Sup]() import org.json4s.JsonDSL._ { val jv = JObject( JField("a", "bc"), JField("bb", 3) ) JsonMethods.pretty(jv) val mm2 = Extraction.extract[FieldOnly](jv) assert(mm2.a -> mm2.b == "bc" -> Some(3)) }
This triggered the error message:
org.scalatest.exceptions.TestFailedException: ("bc", None) did not equal ("bc", Some(3))
It appears that both aliases were ignored, is there an easy fix?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
json4s version
3.7.0-M11
scala version
2.13.12
jdk version
11
(main article: https://stackoverflow.com/questions/77970715/in-json4s-jackson-with-scala-2-fieldserializer-doesnt-compose-well-with-jsona)
Here is a short example:
This triggered the error message:
It appears that both aliases were ignored, is there an easy fix?
The text was updated successfully, but these errors were encountered: