JSON-B is a new specification included in JEE 8. Using a simple annotation you can convert Java objects to JSON and vice versa. JSON-B has one important annotation, @JsonProperty. Specifying this annotation for a class member marks it for serialization to or from JSON.
JSON-B provides the JsonbBuilder class, using which you can perform actual serialization. Let's learn how to use JSON-B with a simple application.