nextChildOrNull
Deprecated (with error)
Use an explicit iterator()
Exception-free version of nextChild
Migration Examples:
Using decodeRethrowing
:
val result = structure.decodeRethrowing {
val child = nextOrNull()
// ...
DecodedStructure(...)
}
Content copied to clipboard
Manual iteration:
val iterator = structure.iterator()
while (iterator.hasNext()) {
val child = iterator.nextOrNull()
// Process child
}
Content copied to clipboard