FasterXML / jackson-module-kotlin

Module that adds support for serialization/deserialization of Kotlin (http://kotlinlang.org) classes and data classes.
Apache License 2.0
1.12k stars 175 forks source link

Fix handling of vararg deserialization #743

Closed k163377 closed 8 months ago

k163377 commented 8 months ago

Previously, if the input was undefined for a vararg argument, it was treated as if null had been entered. This is the same behavior as with databind. On the other hand, in Kotlin, the vararg argument is always non-null, which causes an error.

Therefore, vararg arguments are now treated as if they were arguments with an empty array as the default value. This allows deserialization even if the input to the vararg argument is undefined. In addition, vararg arguments are now basically treated as non-required.

from: https://github.com/ProjectMapK/jackson-module-kogera/pull/197