You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Java's Integer[] and Kotlin's Array<Int> the serialization results match, so this issue is closed.
If you think they should be serialized as well as primitive arrays, please submit a feature request to databind.
This was a misunderstanding.
In fact, there seems to be a problem with the serialization result of kotlin.jvm.internal.ArrayIterator, so re-open #674.
Describe the bug
Kotlin array iterators are serialized as beans, unlike Java iterators which as serialized as arrays, using the IteratorSerializer.
To Reproduce
main.kt
Java.java
Output:
Expected behavior
I expected the JSON for Kotlin and Java array iterators to be consistent.
Versions
Kotlin:
Jackson-module-kotlin: 2.14.0
Jackson-databind: 2.14.0
Additional context
This problem was found in a project with a mixed Java and Kotlin codebase.
Workaround:
Force serializing all iterators as such, using a mixin:
The text was updated successfully, but these errors were encountered: