I've found that ObjectMapper
tends to omit nullable parameters.
Following expression:
objectMapper.readValue<Pair<String?,Long?>>("{}")
causes:
caused by com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException: Instantiation of [simple type, class kotlin.Pair] value failed for JSON property first due to missing (therefore NULL) value for creator parameter first which is a non-nullable type at [Source: (String)"{}"; line: 1, column: 2] (through reference chain: kotlin.Pair["first"])
while:
data class InternalPair(val first: String?, val second: Long?)
objectMapper.readValue<InternalPair>("{}")
works fine.
Is it intended or is it a bug?