Book Image

RESTful Java Web Services, Second Edition

Book Image

RESTful Java Web Services, Second Edition

Overview of this book

Table of Contents (17 chapters)
RESTful Java Web Services Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using the Jackson API for processing JSON


Jackson is a multipurpose data processing Java library. The primary capability of this tool is the support for processing JSON. It also has additional modules for processing the data encoded in other popular formats such as Apache Avro (a data serialization system), Concise Binary Object Representation (CBOR)—a binary JSON format, Smile (a binary JSON format), XML, comma-separated values (CSV), and YAML. In this section, we will learn how to use Jackson APIs for processing JSON.

Jackson provides the following three alternative methods for processing JSON:

  • Tree model APIs: This method provides APIs for building a tree representation of a JSON document

  • Data binding API: This method provides APIs for converting a JSON document into and from Java objects

  • Streaming API: This method provides streaming APIs for reading and writing a JSON document

We will discuss the preceding three methods in detail in this section.

Tip

To know the dependencies of Jackson2...