You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@juneau.apache.org by "James Bognar (Jira)" <ji...@apache.org> on 2020/05/23 14:33:00 UTC
[jira] [Updated] (JUNEAU-231) Simplified PojoSwaps using functions
[ https://issues.apache.org/jira/browse/JUNEAU-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Bognar updated JUNEAU-231:
--------------------------------
Issue Type: Bug (was: Improvement)
> Simplified PojoSwaps using functions
> ------------------------------------
>
> Key: JUNEAU-231
> URL: https://issues.apache.org/jira/browse/JUNEAU-231
> Project: Juneau
> Issue Type: Bug
> 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)