I should be able to serialize/deserialize a org.springframework.data.util.pair to JSON / from JSON.
I have List<Pair<A, B>> myPairList - this list I like to store/load.
Serialization is no problem; however, since this pair is immutable, there is no default constructor and the deserialization fails.
I know that there is @JsonCreator; but if I am corretly, we can place it only on a constructor. Since pair class is final, I cannot extend it with an own default constructor annotated with @JsonCreator.
Can anybody point me out, how I can achieve my goal anyway? I would like to avoid creating an own wrapper class.