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] [Updated] (JUNEAU-231) Simplified PojoSwaps using functions
Date Sat, 23 May 2020 14:44:00 GMT

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

James Bognar updated JUNEAU-231:
--------------------------------
    Issue Type: Improvement  (was: Bug)

> 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
>            Priority: Major
>
> It would be useful to be able to create PojoSwaps using a functional interface.  Something
like this:
> {code:java}
> JsonSerializer s = JsonSerializer
>    .create()
>    .pojoSwaps(
>       Swaps.swap(MyBean.class, String.class, x -> x.toString()), 
>       Swaps.unswap(String.class, MyBean.class, x -> new MyBean(x))
>    )
>    .build();{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message