-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
First class support for polymorphism (subclasses!) #231
Comments
Was this ever released? I'm using Gson 2.3.1 and don't see it.. |
I don't think so. |
GsonFire does something that could help (see "Type Selectors" here) |
Didn't know about that, thanks for the heads up! |
Hey guys , Class B extends A{ Class C extends A{ Class D extends A{ Class Test extends A{ can someone tell me whats the solution for this. I found using RuntimeTypeAdaptorFactory would solve it but, I using gson 2..5, in that version I dont see this class. Struck with this issues for a past three days. writing custom serializations code for my usecase runs for pages.kindly help. whats the work around that the current gson library is having. |
Copy over RuntimeTypeAdapterFactory code. It is meant to be used as copied source-code. |
Add pull request #1055 that shows a few issues regarding Collection. I would be glad about feedback. My problem is that I need to deserialize Collections at runtime - thus I can't use the new TypeToken<List>() {}.getType() syntax. I only have a Class instance. Do I have to register some special type of Collection adapter or JsonDeserializer? I tried to add a deserializer but this wasn't possible because I lack needed types for fromJson calls.
As you can see in this example, I am getting to a point where the deserializer doesn't get a json array - but MyClass (from Collection - this is a little bit weird for me - because I get those elements one by one, not via array. |
Original issue reported on code.google.com by
limpbizkit
on 28 Aug 2010 at 6:00The text was updated successfully, but these errors were encountered: