Join Ketkee Aryamane for an in-depth discussion in this video Applying date/number formats to attributes, part of Java EE 8: JSON-B.
- [Instructor] Up next is the customized mapping…for applying a date and number format.…Now, by default, JSON binding API uses the ISO format…to format your data number fields,…so let's head back to the IDE,…and let's create a test class here.…Test, date, time, formats.…Let the convention be right, OK.…And let's come down and grab the main method,…and under that, I'm going to just create…the JsonbBuilder call…to serialize a date object.…
New date, java route util, and provide it some long value.…And then take this entire thing…and print it out on the console.…S O U T, system dot-dot-dot, print LN,…yeah, so now if I run this,…it'll give you that ISO format, all right?…Now, it is possible that you can change the format…for the respective date fields that you have…in your Java Beans.…For example, in my code, I have the Order object,…and I have this couple of date fields that I have,…Order date, and delivery date.…
And of course, I have chosen the java dot time package,…local date API, in order to provide the data type,…
- 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
Java EE: RESTful Service with JAX-RS 2.0with Alex Theedom2h 17m 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.