Join Ketkee Aryamane for an in-depth discussion in this video Implementing serializer interface, part of Java EE 8: JSON-B.
- [Instructor] So the Use case that we have is,…we are going to identify different kinds of people…who come for that conference meet.…So I have a software developer, I have a professor,…I could have some other kind of a person.…All of them belong to the same inheritance hierarchy.…So when you serialize a collection of such objects,…how do you even deserialize it?…Because there's no way to figure out…which object you're trying to create…back from the JSON document, right?…So now let's go ahead and implement the custom serializer.…So, for that we need to write a class…which implements the JSON-B serializer interface.…Let's head back to the IDE and under the Custom folder,…I will create a class which will, let's say,…be called PersonSerializer.…
And what is this going to do?…This is going to implement the JsonbSerializer interface.…And who are we doing this job for?…For the Person class.…So that will be the generics value that we apply.…So the moment we do this we'll have…to implement the abstract methods.…Right?…
- 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: RESTful Service with JAX-RS 2.0with Alex Theedom2h 17m 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.