Join Ketkee Aryamane for an in-depth discussion in this video Handling null serializations, part of Java EE 8: JSON-B.
- [Instructor] Let's now look at the customized mapping…option that we have for null serializations.…By default the serialization of null…values does not happen.…So, if you have any property, which is set to null,…JSON binding API is going to skip the…serialization process for such things.…The reason that it is done is that if you have too many…properties with the null values, then the payload that…you're trying to send across, which is the JSON…representation, will unnecessarily grow a little longer,…which is why null values are skipped.…However, this may not be the intended behavior…that you want for your application.…
So in cases where you want that the null values are…also considered during the serialization process,…we have certain ways around it to do the necessary mapping.…So let's see how to do that.…The first option is you have the JSONbNillable…annotation, which you can attach on…the class or the package in full level,…and get all the properties that are null in that particular…java object to be considered for serialization.…
- 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
- Custom serializers and deserializers
- Demo: Using JSON-B in a web application
Skill Level Intermediate
Java EE: Servlets and JavaServer Pages (JSP)with Ketkee Aryamane6h 14m Intermediate
Map Java objects to JSON1m 14s
1. Overview and Setup
2. JSON Binding API: Default Mapping
3. JSON Binding API: Customized Mapping, Part 1
4. JSON Binding API: Customized Mapping, Part 2
5. Adapters and Serializers
6. JSON-B in a Web Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.