In the previous Gson blog posts, we've always read and
written JSON from and to fully allocated memory objects. We assumed that the application already has the entire JSON file in memory.
In this blog post, we'll explore Gson's support in cases that isn't possible. Gson makes it easy to convert JSON from and to Java's InputStream
s and OutputStream
s.
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