You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@johnzon.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2019/07/25 13:25:00 UTC

[jira] [Resolved] (JOHNZON-213) Make @JsonbTypeAdapter works with accessors

     [ https://issues.apache.org/jira/browse/JOHNZON-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved JOHNZON-213.
-----------------------------------
    Resolution: Not A Problem
      Assignee: Mark Struberg

I think this can be resolved, right? Please reopen if there is still something we need to fix - txs!

> Make @JsonbTypeAdapter works with accessors
> -------------------------------------------
>
>                 Key: JOHNZON-213
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-213
>             Project: Johnzon
>          Issue Type: Bug
>          Components: JSON-B
>    Affects Versions: 1.1.12
>            Reporter: Jin Kwon
>            Assignee: Mark Struberg
>            Priority: Major
>
> For some reasons, I need to annotate an overridden method with an {{@JsonbTypeAdapter}}.
> {code:java}
> class Parent<T extends ...> {
>     T options;
> }
> class Child extends Parent<SomeOptions> {
>     @JsonbTypeAdapter(value = SomeOptionsTypeAdapter.class)
>     public SomeOptions getOptions() {
>         return super.getOptions();
>     } 
> }
> {code}
> Now Johnzon complains.
> {code}
> javax.json.bind.JsonbException: Missing a Converter for type class ...Params$Options to convert the JSON String '{"..."}' . Please register a custom converter for it.
> Caused by: org.apache.johnzon.mapper.MapperException: Missing a Converter for type class ...Params$Options to convert the JSON String '{"..."}' . Please register a custom converter for it.
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)