@@ -10,6 +10,8 @@ import com.fasterxml.jackson.databind.deser.std.StdKeyDeserializers
10
10
// If StdKeyDeserializer is modified, need to modify this too.
11
11
12
12
internal object UByteKeyDeserializer : StdKeyDeserializer(TYPE_SHORT , UByte : :class.java) {
13
+ private fun readResolve (): Any = UByteKeyDeserializer
14
+
13
15
override fun deserializeKey (key : String? , ctxt : DeserializationContext ): UByte? = super .deserializeKey(key, ctxt)
14
16
?.let {
15
17
(it as Short ).asUByte() ? : throw InputCoercionException (
@@ -22,6 +24,8 @@ internal object UByteKeyDeserializer : StdKeyDeserializer(TYPE_SHORT, UByte::cla
22
24
}
23
25
24
26
internal object UShortKeyDeserializer : StdKeyDeserializer(TYPE_INT , UShort : :class.java) {
27
+ private fun readResolve (): Any = UShortKeyDeserializer
28
+
25
29
override fun deserializeKey (key : String? , ctxt : DeserializationContext ): UShort? = super .deserializeKey(key, ctxt)
26
30
?.let {
27
31
(it as Int ).asUShort() ? : throw InputCoercionException (
@@ -34,6 +38,8 @@ internal object UShortKeyDeserializer : StdKeyDeserializer(TYPE_INT, UShort::cla
34
38
}
35
39
36
40
internal object UIntKeyDeserializer : StdKeyDeserializer(TYPE_LONG , UInt : :class.java) {
41
+ private fun readResolve (): Any = UIntKeyDeserializer
42
+
37
43
override fun deserializeKey (key : String? , ctxt : DeserializationContext ): UInt? = super .deserializeKey(key, ctxt)
38
44
?.let {
39
45
(it as Long ).asUInt() ? : throw InputCoercionException (
@@ -47,6 +53,8 @@ internal object UIntKeyDeserializer : StdKeyDeserializer(TYPE_LONG, UInt::class.
47
53
48
54
// kind parameter is dummy.
49
55
internal object ULongKeyDeserializer : StdKeyDeserializer(TYPE_LONG , ULong : :class.java) {
56
+ private fun readResolve (): Any = ULongKeyDeserializer
57
+
50
58
override fun deserializeKey (key : String? , ctxt : DeserializationContext ): ULong? = key?.let {
51
59
it.toBigInteger().asULong() ? : throw InputCoercionException (
52
60
null ,
@@ -58,6 +66,8 @@ internal object ULongKeyDeserializer : StdKeyDeserializer(TYPE_LONG, ULong::clas
58
66
}
59
67
60
68
internal object KotlinKeyDeserializers : StdKeyDeserializers() {
69
+ private fun readResolve (): Any = KotlinKeyDeserializers
70
+
61
71
override fun findKeyDeserializer (
62
72
type : JavaType ,
63
73
config : DeserializationConfig ? ,
0 commit comments