Jakarta JSON Binding
Jakarta JSON Binding is a high-level API that allows us to almost seamlessly populate Java objects from JSON data, as well as easily generate JSON-formatted data from Java objects.
Populating Java objects from JSON with JSON Binding
A common programming task is to populate Java objects from JSON strings. It is such a common task that several libraries were created to transparently populate Java objects from JSON, freeing application developers from having to manually code this functionality. Several non-standard Java libraries that accomplish this task exist, such as Jackson (https://github.com/FasterXML/jackson), json-simple (https://code.google.com/archive/p/json-simple/), or Gson (https://github.com/google/gson). Jakarta EE includes a standard API providing this functionality, namely JSON Binding. In this section, we will cover how to transparently populate a Java object from a JSON string.
The following example shows a RESTful web service written using...