From the course: Learning Java Enterprise Edition

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

JSON Processing introduction

JSON Processing introduction - Java EE Tutorial

From the course: Learning Java Enterprise Edition

Start my 1-month free trial

JSON Processing introduction

- [Instructor] In this video we're going to look at another new API that was introduced in Java EE 7 and that is the JSON processing API. The JSON processing API is often used in the presentation layer to create JSON representations or objects for JAX-RS, as we have already seen. And also in the business layer for transforming JSON representation to objects. The JSON processing API parses, transforms and queries JSON date using either the object model or the streaming model. We're going to give both of these two methods of processing JSON data a little bit of attention before taking a look at how we use the streaming model in the Cargo Tracker application. The object model creates a tree that represents the JSON data. The tree can be navigated, analyzed, or modified. This approach is more flexible than the streaming approach. Nevertheless, it is slower and requires more memory as the model navigates the entire tree at once. The streaming model is an event-based parser that reads JSON…

Contents