November 2017
Intermediate to advanced
420 pages
10h 29m
English
The previous example demonstrated the Gson APIs for converting a JSON representation of a single employee object into a Java object. This section discusses how to convert a JSON object array into a Java collection. You can do this by calling the fromJson(JsonReader reader, Type typeOfT) method on the Gson instance. Let's take an example to better understand this API. The steps are as follows: