Based on a bug report that I first thought was invalid, I (finally?)
got an idea that seems worth considering -- what if following usage:

--------------
public class MyValue {
   public MyValue(@JsonValue List<String> words) {
       ...
   }

    @JsonValue
    public List<String> asList() { .... }
}

worked as... well, you might except, that is, as an alias for:

public class MyValue {
   @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
   public MyValue(List<String> words) {  ... }
}

--------------

WDYT?

This might be even more compact for Kotlin -- or maybe not, I am not
quite sure how annotations are bound from source to underlying
accessors.

-+ Tatu +-

-- 
You received this message because you are subscribed to the Google Groups 
"jackson-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jackson-dev/CAL4a10i_SVVSFcFtDRTHxHPx%3DkcH3oAUzB%3DR3LbVi_HUZ2B-PQ%40mail.gmail.com.

Reply via email to