Skip to Content
RESTful Java Web Services - Third Edition
book

RESTful Java Web Services - Third Edition

by Balachandar Bogunuva Mohanram
November 2017
Intermediate to advanced
420 pages
10h 29m
English
Packt Publishing
Content preview from RESTful Java Web Services - Third Edition

Processing JSON with Gson streaming APIs

In addition to the object model APIs, the Gson library supports the streaming APIs for reading and writing the JSON representations. The streaming APIs in Gson follow the pull parser model. Here is a list of the important streaming API classes in Gson:

Class

Description

com.google.gson.stream.JsonReader

This class reads the JSON-encoded value as a stream of tokens. Tokens are read in the same order as they appear in the JSON document.

com.google.gson.stream.JsonWriter

This class writes a JSON-encoded value to the stream, one token at a time.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

RESTful Java Web Services, Second Edition

RESTful Java Web Services, Second Edition

Jobinesh Purushothaman
Java Web Services

Java Web Services

David A Chappell, Tyler Jewell

Publisher Resources

ISBN: 9781788294041Supplemental Content