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

JsonbTypeDeserializer should support parameter elements #71

Open
jansupol opened this issue Feb 28, 2018 · 1 comment
Open

JsonbTypeDeserializer should support parameter elements #71

jansupol opened this issue Feb 28, 2018 · 1 comment

Comments

@jansupol
Copy link
Owner

I can do this:

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.

@jansupol
Copy link
Owner Author

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

No branches or pull requests

1 participant