- [Instructor] Okay, next one is final fields.…Okay, how do final fields look like…in JSON serialization?…Let's go there and make sure we go right up…and create a final variable.…So I'm gonna say "public final", "string",…and let's declare the user type.…It's a final variable, which is why…I have used that naming convention.…The convention is the always…the variable name is going to be all in uppercase, right?…All characters in uppercase.…
So let's give it a value, I'll say, "admin".…Let's say this user is the admin tag.…Okay, I'm setting a value right there…because it's a final field.…Right? The Java concept.…Now let's come down, and let's see that…when I try to serialize the user object,…whether that final field shows up or not.…So let's go ahead and run this...…Yes it does.…So final fields totally work…for JSON Binding API.…That's good. Next is static fields.…So let's say I want to put a static field right up there,…I want to go ahead and count…the number of users in my system.…
I will make a field, let's say,…"public static...…
- 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.