This post explains how to write json data to a file using JsonWriter. With JsonWriter we dont need to build the entire object in memory. The code explains how to write the below json data [ { “id”: 1, “text”: “text1”, “array”: null }, { “id”: 2, “text”: “text2!”, “array”: [ 50.454722, -104.606667 ] }…… Continue reading Writing JSON Data using JsonWriter
Category: JSON streaming
Parsing JSON data in a streaming way
In this post, I will explain how to parse JSON data using Gson framework. Each element whether start and end of the object, start and end of array, field name and field values are considered as tokens and are represented by JsonToken enums. The Gson framework parses the json data as a stream of tokens.…… Continue reading Parsing JSON data in a streaming way