The same problem. I'm using kotlin too. The subclasses has inherit
@Deserializer annotation again. So the ObjectMapper fall in an infinite-loop.
--
You received this message because you are subscribed to the Google Groups
"jackson-user" group.
To unsubscribe from this group and stop receiving
Hi,
I have a property which can be an integer or an object without any explicit
`type` property. I tried to use JsonDeserialize annotation and provide a
custom deserializer;
data class Report(val measures: List)
@JsonDeserialize(using=IntOrMeasureDeserializer::class)
sealed class IntOrMeasure
That worked. Thanks for the suggestion Tatu.
On Monday, April 9, 2018 at 6:47:15 PM UTC-4, Tatu Saloranta wrote:
>
> Do you think `@JsonAnySetter` would work here, attached to Map? It
> would get all values that do not map to existing regular properties?
> It wouldn't do anything for
Do you think `@JsonAnySetter` would work here, attached to Map? It
would get all values that do not map to existing regular properties?
It wouldn't do anything for underscores but would allow easy collection.
Or, if you want to strip underscore, you could specify method instead
@JsonAnySetter
Hello,
I'm trying to figure out the best way to implement a deserializer for the
following setup:
class Model {
private String prop1;
private String prop2;
Map userDefined;
}
json:
{
"prop1": "prop one",
"prop2": "prop two",
"_prop3": "prop three",
"_prop4":
Hello,
I have a problem with a deserializer I am working on.
At the deserializer I want to register values, which indicate that the
resulting Optional should be empty. But if the value in the JSON string
is null, the Optional will be null as well, else it works as expected.
Here is the code