In this blog post, we'll tackle one of the most complicated issues of any data mapping: dates and times. Over the last few decades programmers have developed hundreds of different formats of stating the date and time. Keep reading, if you want to learn how you can utilize some standard formats during the mapping or, alternatively, set your own custom format.
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
- Basics & Naming Policies
- Force Serialization of null Values
- Exclusion Strategies
- Relax Gson with Lenient
- Special Values of Floats & Doubles
- Model Versioning
- Formatting of Dates & Custom Date/Time Mapping
- Pretty Printing
- HTML Escaping
- 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