November 2017
Intermediate to advanced
420 pages
10h 29m
English
You can use com.google.gson.stream.JsonWriter to write the JSON-encoded value to the stream. The following example demonstrates the use of Gson streaming APIs for writing JSON data. This example writes the JSON array representation of employee objects to the emp-array.json file. The steps are as follows: