I have a list of javascript objects on my client side that are a list of "events" that the user has executed. When the user is ready, I want to send it to the server. The order of events is important, so you must keep the order of the list.
What I would like to do is to have a JSON library (regardless of any) to associate JSON with some Event objects in my Java code, where Event is an abstract class, and I have 3 specific classes, all extend Event (lets say EventA, EventB and EventC).
The perfect scenario would look like
List<Event> events = jsonlibrary.deserialise(jsonString);
which may contain a list of items such as
[eventA, eventC, eventA, eventA, eventB]
Is this possible, or do I need to manually check the JSON tree and deserialize the individual elements of the json array?
source share