Join Alex Theedom for an in-depth discussion in this video JSON-P API introduction, part of JSON Processing with Java EE.
- [Narrator] The JSON processing 1.0 API is specified in the JSR 353: JSON API for JSON Processing and is a low-level, lightweight JSON passer and generator which provides for the manipulation of JSON data at the property value level. You should always read the specification documentation of any Java Enterprise Edition API you wish to use. It will contain the specification that a compliant API must adhere to in order to be able to refer to itself as an implementation of mass specification.
All specifications for Java EE APIs are hosted on the Java Community Process website located at jcp.org. Here is the homepage of the JSR 353: Java API for JSON Processing specification. From here, you can download various documentations related to the JSR. If you read the specification documentation, you will see that it specifies that the JSON data can be processed with two models. An object model and a streaming model. More about these later on in the course.
A website that provides information about the reference implementation of JSON-P is located at jsonp.java.net. This site contains links to user guides, information on how you can contribute to the continued development of this API, and much, much more. One feature that the specification does not specify is that an implementation should support JSON binding. JSON binding is the mapping of JSON data to a (mumbles) and is specified in another JSR designed for this purpose. Our specification is JSR 367: JSON binding and contains APIs necessary to bind JSON directly to classes.
To find out more about JSON binding, you should definitely take a look at the JSR and you'll also find a plethora of information and great examples on the APIs official website which is located at json-b.net. Both the streaming and the object models can generate JSON data, and I'll put it to a stream such as FAT file for offline processing and storage. And both models can read data efficiently. However, the streaming model is especially efficient at processing high volumes of JSON data. This allows for the implementation of data import functionality, and the transformation of data on the fly.
Don't confuse this API with JSON with padding, which is also referred to as JSON-P. This can be especially confusing when searching for it in a search engine.
In this course, discover how to use the Java Enterprise Edition (EE) JSON-Processing API. With its two programming models, JSON-Processing is one of the simplest ways to generate, query, and parse JSON data, and you'll find that implementing it in your projects is quick and easy. Join Alex Theedom as he covers an array of topics, including how to use both the object model and the streaming model, how to traverse a JSON structure, and how to parse JSON data using the extensive builder APIs. When you wrap up this course, you'll be ready to develop with this essential and powerful API.
- Working with JSON and Java
- JSON-Processing API features
- The Java EE JSON object model
- Creating a model from a JSON string
- Building a JSON model
- Traversing the JSON model
- Outputting the JSON model to a data stream
- Parsing and writing JSON data