Jsonb jsonb = JsonbBuilder.create();
Overview of the JSON Binding API
This section provides basic instructions for using the JSON-B client API. The instructions provide a basis for understanding the jsonbbasics Example Application. Refer to the JSON-B project page for API documentation and a more detailed User Guide.
The following topics are addressed here:
Creating a jasonb Instance
Using the Default Mapping
JSON-B provides default mappings for serializing and deserializing basic Java and Java SE types as well
Java date and time classes. To use the default mappings and mapping behavior, create a josnb instance
and use the
JSON-B supports many ways to customize the default mapping behavior. For runtime
The following example creates a configuration object that sets the
JSON-B includes many annotations that can be used at compile time to customize the default mapping behavior.
The following example uses the
The resulting JSON document is written as: