Search before asking
Describe the bug

The new version has added a map function to JsonNode for transforming JsonNode. I frequently use Kotlin, and since JsonNode implements Iterable, I could conveniently use node.map { it.xx } for a JsonArray to process each JsonNode and obtain a List. However, the newly added map function has overridden the map operator from Iterable with the one defined on JsonNode itself. As a result, I have to use much more verbose syntax, such as:
private fun <T> JsonNode.mapArray(fn: (JsonNode) -> T): List<T> = IntRange(0, size() - 1).map { fn(get(it)) }
I then renamed it to mapArr to avoid conflicts. While the native map operator on JsonNode has some use cases, I believe it is far less functional and practical than the map operator from Iterable.
When I upgrade to the new version, I have to adjust my original code.
Version Information
3.1.0
Reproduction
<-- Any of the following
- Brief code sample/snippet: include here in preformatted/code section
- Longer example stored somewhere else (diff repo, snippet), add a link
- Textual explanation: include here
-->
Expected behavior
No response
Additional context
No response
Search before asking
Describe the bug
I then renamed it to mapArr to avoid conflicts. While the native map operator on JsonNode has some use cases, I believe it is far less functional and practical than the map operator from Iterable.
When I upgrade to the new version, I have to adjust my original code.
Version Information
3.1.0
Reproduction
<-- Any of the following
-->
// Your code hereExpected behavior
No response
Additional context
No response