Uploaded image for project: 'Juneau'
  1. Juneau
  2. JUNEAU-231

Simplified PojoSwaps using functions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 8.1.3
    • None
    • Code
    • None

    Description

      It would be useful to be able to create PojoSwaps using a functional interface.  Something like this:

      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();

      Attachments

        Activity

          People

            Unassigned Unassigned
            jamesbognar James Bognar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: