After more than fifteen function-relevant Gson tutorials we'll move to something more developer focused. By default Gson will create minified JSON strings. This is important to reduce the amount of data being transferred over the network. However, especially with large models, for us developers it can be challenging to read the output. If you're checking the JSON and trying to verify the created structure, this tutorial might help you.
Of course, this will not be the only tutorial 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