Gson Advanced — Custom Deserialization for Calculated Fields

In this blog post, we'll combine the knowledge of two previous blog posts in one practical use case. You've learned how we can write custom deserializer and how you can annotate model classes with @JsonAdapter. In the next few sections, we'll use those to build a custom deserializer, which correctly sets a computed property field.

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


Continue reading

University Enrollment Required

Future Students benefit from value packed videos and tutorials.

Enroll to receive exclusive content or sign in if you’re already a Future Student.

Enroll me for $15/mo

Explore the Library

Find interesting tutorials and solutions for your problems.