Practical Gson — How to Deserialize a List of Polymorphic Objects
Recently, I ran into a situation where I receive a list of objects in JSON from a REST endpoint. So far, this is nothing unusual and not a problem. However, the catch was that the objects were polymorphic and it was required to parse the child-class-specific fields. The previous solution …
Continue Reading