From the course: WebSocket Programming with Java EE

Unlock the full course today

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

Use the JSON Processing API

Use the JSON Processing API

From the course: WebSocket Programming with Java EE

Start my 1-month free trial

Use the JSON Processing API

- [Narrator] The JSON Processing API is a new API included in the Java EE 7 release. We will be using the JSON Processing API to construct messages in the JSON interchange format, and then to extract the JSON data from the received message and populate a message object. The reason I decided to use this format is threefold: firstly, it is a native format to JavaScript and integrates naturally with the HTML5 WebSocket API on the client; secondly, because Java EE has a very good API that can manipulate JSON data; and finally, the JSON format is a very simple and lightweight way to transport data between disparate systems. Okay, let's start by having a look at the JSON Processing API. The JSON PAPI has two models that process JSON data: the object model, and the streaming model. In this course, we're only going to have a look at the object model. If you're interested in learning more about both models, why don't you pop over to my course JSON Processing With Java EE, where I explore this…

Contents