public class Foo {
private UUID id;
@JsonbTypeDeserializer(UUIDDeserializer.class)
public setId(UUID id) {
this.id = id;
}
}
But I can't do this:
public class Foo {
private final UUID id;
@JsonbCreator
public Foo(
@JsonbParameter("id") @JsonbTypeDeserializer(UUIDDeserializer.class) UUID id
) {
this.id = id;
}
}
Even though the above is semantically identical. The reason it doesn't work is that the @Target for the @JsonbTypeDeserializer annotation is not configured for parameter elements.
I can do this:
But I can't do this:
Even though the above is semantically identical. The reason it doesn't work is that the
@Target
for the@JsonbTypeDeserializer
annotation is not configured for parameter elements.