Skip to content
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

Feature: Add support for InstanceCreatorEx interface with createInstance(JsonElement json, Type typeOfT) #238

Closed
GoogleCodeExporter opened this issue Apr 1, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

json data can contain information about which exact class should be created,
but original InstanceCreator can't use this information.

Example: 
I have abstract Command class and Command1, Command2, etc subclasses.
My json data contains "type":"Command1" pair.

So we can overcome "Collections Limitations" and can deserialize 

Collection[? extends Command] realCommands = gson.fromJson(json, 
collectionTypeCommand);

Original issue reported on code.google.com by rybin.andrey on 20 Sep 2010 at 12:38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant