The APIs you've to integrate into your applications will evolve over time. Usually you can simply update your models to the newer version, but this is not always possible. If your application has to deal with multiple versions of the same model, this is the perfect tutorial for you. You'll learn how you can write one model for multiple versions of the API.
Of course, this will not be the only post in our Gson series. If you're interested in the other topics, check out our series outline:
Gson Series Overview
- Mapping of Enums
- Mapping of Circular References
- Generics
- Custom Serialization for Simplification (Part 1)
- Changing the Default Serialization with Custom Serialization (Part 2)
- Custom Deserialization Basics
- Custom Instance Creator
- Customizing (De)Serialization via @JsonAdapter
- Custom Deserialization for Calculated Fields
- On-The-Fly-Parsing With Streams
- ProGuard Configuration