Please accept YouTube cookies to play this video. By accepting you will be accessing content from YouTube, a service provided by an external third party.

YouTube privacy policy

If you accept this notice, your choice will be saved and the page will refresh.

Show the video description

In this video series we take a look at the GSON library, which is provided by Google and makes the process of turning Java objects into their JSON representation (serialization) and JSONs into Java objects (deserialization) very easy.

In part 1 we are going to create a simple Java class, create an object of it, turn it into a JSON and then turn that JSON back into the java object. We will also learn how to use the @SerializedName annotation to use different keys and variable names.

Important LinksEmployee.javaMainActivity.javaemployee.json

Library on GitHub with installation instructions:

github.com/google/gson