Closed electrum closed 11 years ago
This would make sense, when the thing is specifically declared as Iterable. I think most concerns would be for other kinds of cases, for serialization (where Iterable
tends to be implemented as secondary trait, and not always be the interface to use).
Help would be appreciated, we defnitely want to support this.
Spend some time figuring out how to do it, added support, will be in 2.2.
I often have a class like this:
This class takes an iterable when used for serialization, because this allows streaming serialization if the underlying data source is iterable.
When deserializing, Jackson should be smart enough to deserialize this as a List (or any ordered Iterable type). I shouldn't have to write a separate constructor that takes a List or write a bunch of code to register a custom deserializer mapping.