juneau-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Bognar (Jira)" <j...@apache.org>
Subject [jira] [Created] (JUNEAU-231) Simplified PojoSwaps using functions
Date Thu, 21 May 2020 12:48:00 GMT
James Bognar created JUNEAU-231:

             Summary: Simplified PojoSwaps using functions
                 Key: JUNEAU-231
                 URL: https://issues.apache.org/jira/browse/JUNEAU-231
             Project: Juneau
          Issue Type: Improvement
          Components: Code
    Affects Versions: 8.1.3
            Reporter: James Bognar

It would be useful to be able to create PojoSwaps using a functional interface.  Something
like this:
JsonSerializer s = JsonSerializer
      Swaps.swap(MyBean.class, String.class, x -> x.toString()), 
      Swaps.unswap(String.class, MyBean.class, x -> new MyBean(x))

This message was sent by Atlassian Jira

View raw message