Processing JSON with JSR 353 object model APIs

This category of APIs generates an in-memory tree model for JSON data and then starts processing it as instructed by the client. This is conceptually similar to the Document Object Model (DOM) API for XML.

Here is a list of the frequently used classes in the object model API of the JSR 353 specification:

Class or interface

Description

javax.json.Json

This class is the main factory class for creating JSON processing objects, such as JsonReader and JsonWriter.

javax.json.JsonReader

This interface reads the JSON content and generates a JSON object or array as appropriate.

javax.json.JsonWriter

This interface writes a JSON object or array to an output source.

javax.json.JsonObjectBuilder

This interface offers APIs for generating the JsonObject models from scratch.

javax.json.JsonArrayBuilder

This interface offers APIs for generating JsonArray models from scratch.

javax.json.JsonValue

This interface is the superinterface representing an immutable JSON value. The JSON value takes one of the following forms:

  • javax.json.JsonObject
  • javax.json.JsonArray
  • javax.json.JsonNumber
  • javax.json.JsonString
  • javax.json.JsonValue.TRUE
  • javax.json.JsonValue.FALSE
  • javax.json.JsonValue.NULL

 

The JSR 353 object model APIs are easy to use and rich in offerings.

Refer to the complete list of the object model APIs available in JSR 353 at http://docs.oracle.com/javaee/7/api/javax/json/package-summary.html.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.37.154