I am using Google\'s GSON package http://code.google.com/p/google-gson/
I am converting JSON to Java.
I have this fragment of code where I do the conversion.
Gson does not currently have a simple mechanism for polymorphic deserialization, other than implementing custom deserialization processing. The next release looks like it will provide a built-in solution.
Previous StackOverflow.com Questions And Answers (Some With Examples) On This Topic: