Java EE 8: JSON-B

Java EE 8: JSON-B

English | MP4 | AVC 1280Ă—720 | AAC 48KHz 2ch | 3h 55m | 564 MB

JSON is the most popular format for data exchange. JSON-B is a standard binding layer for converting Java objects to and from JSON messages. It comes bundled with Java Enterprise Edition—containing all the features of third-party libraries without any of the integration effort. JSON-B defines a default mapping algorithm for converting existing Java classes to JSON, while enabling developers to customize the mapping process through the use of Java annotations. Learn default and customized mappings for JSON-B and see it in action in a JAX-RS web application, in this course with instructor and developer Ketkee Aryamane. Ketkee reviews all the features of JSON-B, including adapters and serializers, showing them in practice in real-world Java applications.

Topics include:

  • JSON and JSON-B API basics
  • Default mapping
  • Defining beans and data
  • Customized mapping
  • Customizing the order of serialized properties
  • Customizing constructors
  • Working with binary data
  • Adapters
  • Custom serializers and deserializers
  • Demo: Using JSON-B in a web application
Table of Contents

Introduction
1 Map Java objects to JSON
2 What you should know

Overview and Setup
3 JSON and its significance
4 JSON structure – JSON types
5 JSON vs. XML
6 JSON-B API overview
7 Application setup

JSON Binding API – Default Mapping
8 Default mapping APIs – single bean
9 General default settings
10 Visibility settings – Fields with getters and setters
11 Visibility settings – Final static and transient fields
12 Define beans
13 Define data
14 Testing with JSON-B
15 Default mapping types
16 Data types supported

JSON Binding API – Customized Mapping Part 1
17 Customize mapping
18 Formatting output
19 Changing bean attribute names – JsonbProperty
20 PropertyNamingStrategy
21 Customize order of serialized properties
22 JsonbTransient transient modifier
23 Custom PropertyVisibility Strategy

JSON Binding API – Customized Mapping Part 2
24 Handling null serializations
25 Custom constructors
26 Test custom constructors
27 Applying date number formats to attributes
28 Binary data strategies
29 iJSON support

Adapters and Serializers
30 Need for JSON-B adapters
31 adaptToJson
32 adaptFromJson
33 Custom serializers and deserializers
34 Problem deserializing inheritance hierarchy
35 Implementing serializer interface
36 Implementing deserializer interface
37 Testing

JSON-B in a Web Application
38 Setup for a JAX-RS application
39 Build RESTful methods
40 Generate data and test
41 Add more RESTful methods
42 Test all RESTful methods

Conclusion
43 Next steps