From the course: JSON Processing 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.

Introduction to the object model

Introduction to the object model

From the course: JSON Processing with Java EE

Start my 1-month free trial

Introduction to the object model

- [Instructor] The JSON P model is a memory-based model, which loads the entire JSON document into memory. As it is loaded, it is parsed into a JSON object structure, with the JsonValue class at the top. All classes related to the object model are located in the the JSON X dot JSON package and consists of the following principle APIs. JsonBuilder, JsonReader, and JsonWriter. As you can see from the tree diagram of the class structure, every value in the model is of type JsonValue. More specific types are defined as JsonObject or JsonArray. These three types are the only types necessary to represent all of the possible data types in a JSON document. So, JsonObject represent a JSON object. The JsonArray represents a JSON array. And all other values, such as string and number, are represented by JsonValue. As mentioned in a previous video, the JsonObject class implements a map and the JsonArray implements a list interface. What this means is that the normal functionality of maps and…

Contents