David Blevins created JOHNZON-414:
-------------------------------------

             Summary: Reads fail with String JsonbTypeAdapter on deserialized 
class
                 Key: JOHNZON-414
                 URL: https://issues.apache.org/jira/browse/JOHNZON-414
             Project: Johnzon
          Issue Type: Bug
          Components: JSON-B
    Affects Versions: 2.0.1
            Reporter: David Blevins


Attempting deserialize class Email as follows
 
{code:java}
final String json = "\"t...@domain.com\"";
final Email email = jsonb.fromJson(json, Email.class);{code}
fails if the adapter is declared on the Email class
{code:java}
@JsonbTypeAdapter(Adapter.EmailClass.class)
public static class Email {
final String user;
final String domain;
final String call;{code}
This will work on a write operation.  Reads will work if a write was done first 
as mappings are cached.  This will work on a read and write in any order if 
Email is a field inside another class.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to