Gson Streaming APIs to read and write JSON

Streaming APIs are efficient ways of processing large JSON files or data without loading the entire document into memory. Gson provides JsonReader and JsonWriter classes for JSON streaming. Gson’s Streaming API JsonWriter – Write JSON as a stream. JsonReader – Read JSON as a stream. Table of contents: 1. Setup Google Gson 1. Write JSON …

Read more

Jackson Streaming API examples

This article shows how to use Jackson’s Streaming API for both reading from and writing to JSON. Jackson’s Streaming API JsonGenerator – Write JSON data JsonParser – Read and Parse JSON data Table of contents: 1. Download Jackson 2. Write JSON using JsonGenerator 2. Write JSON Array using JsonGenerator 3. Read JSON using JsonParser 4. …

Read more