Skip to content
New issue

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

investigate Map serialization test that fails with Scala 3 #533

Open
pjfanning opened this issue Jul 31, 2021 · 1 comment
Open

investigate Map serialization test that fails with Scala 3 #533

pjfanning opened this issue Jul 31, 2021 · 1 comment

Comments

@pjfanning
Copy link
Member

Passes with Scala 2.

@pjfanning
Copy link
Member Author

pjfanning commented Sep 24, 2021

The issue appears to relate to the anonymous class generated for the wrapper val.

    val wrapper = new {
      val map = Map.apply[String, MapValueBase]("Double" -> MapValueDouble(1.0), "String" -> MapValueString("word"))
    }

If I declare a case class that wraps the map, the test passes.

The issue appears to be that when the anonymous class is used then the Java annotations on MapValueBase are not picked up by the jackson code (that uses Java reflection to work out the type information).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant