Closed mhball closed 2 years ago
Great question. I had to look into why the default Java Map implementations don't do this and found: https://stackoverflow.com/a/19422495
This would definitely be a major semver change so I'd need to see if there are others who think this is a more reasonable default. Right now, I'll opt to keep the implementation as-is.
Some map implementations implement the
java.lang.Iterable
interface, which satisfy theArrayLike.isEligible(Object data)
check and get treated as arrays. E.g. Vert.x JsonObject.Can I suggest checking for instances of
java.util.Collection
instead ofjava.lang.Iterable
to find array-like objects to allow for iterable maps?