I´m writing a function which parses JSON and may return different types of objects. Say, I´m parsing an bird json and want to return a bird object, then a tiger json and want to get a tiger object insted.
How can I do this? Should I use a dynamic object? And, if this is the answer, HOW?
I don´t want to overload the logic on each type of object I´d want to get from it.
Thanks in advance,
Ariel