-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jackson should provides a method which can deserialize a collection that contains different type items #3592
Comments
It is already possible to have polymorphic values but you do have to use |
|
@zrlw Ok I don't understand how this is supposed to work; how should types of elements be detected? One other thing to note is that you can use List<?> list = mapper.readValue(json, List.class); // or 'new TypeReference<List<Object>>() { }` which does allow mapping content into |
the types of elements are not be detected but be configured in application config. |
Ok, let me retry: is the idea that you pass in a A link to Javadocs of the fastjson class would be useful too, I assume that explains the logic. |
yes. we don't find any useful javadoc but a simple test of fastjson#parseArray: |
I'm not at all sure about this. I don't think changing jackson-databind is the way to go about this. It may be possible to use Scala's Tuple classes in Java. It will not be as tidy to use classes like scala.Tuple2, scala.Tuple3 in Java but it should be possible to write stuff like There are Java tuple implementations out there too but you may need to write code to serialize/deserialize them. |
No plans to support, closing. |
Is your feature request related to a problem? Please describe.
The text was updated successfully, but these errors were encountered: