Adam Firen
11/04/2022, 5:19 PMvalue classes
as their parameters.
Example:
value class Foo(t: String)
class Bar(foo: Foo)
I have looked into the issue a little bit and it looks like the root cause is that in java reflection api Bar
class constructor is seen as
constructor(foo: String)
Hence my question: is there any way to figure out in java reflection api whether a parameter is of an value class
?
If that's not possible then the only way I can see in jackson to implement the handling is to use kotlin reflection api on each class (it returns the correct value class
type) and then do deserialization based on that. I think it might make a big hit on performance though.ephemient
11/04/2022, 5:37 PMAdam Firen
11/04/2022, 5:39 PM