Join Alex Theedom for an in-depth discussion in this video Create a model from a JSON string, part of JSON Processing with Java EE.
- [Instructor] Let's open up the ObjectExample1 test class…and start writing the test.…Here we are using the arrange act assert test pattern,…as it makes a very clear separation between…the test setup and the code we're actually trying to test.…Also, I've decided that I'm going to use…the test framework called AssertJ.…This is because it's a very fluent and intuitive API.…Okay, so let's get started.…The first thing I want to do is to assert that each element…of the JSON document has been appropriately interpreted…and loaded into the JSON object.…
Let's get started with the first property,…which is the title property.…I'm gonna start with my assertThat statement…and then I'm going to call the jsonObject instance.…On the jsonObject I want to get the first property…which is a string property,…and this string property is called title.…Once I've got the title property,…I call in the getString method on the jsonObject.…I can do a simple isEqualTo and parse in the value…that I expect it to be.…
What I expect it to be is JSON-Processing With Java EE.…
In this course, discover how to use the Java Enterprise Edition (EE) JSON-Processing API. With its two programming models, JSON-Processing is one of the simplest ways to generate, query, and parse JSON data, and you'll find that implementing it in your projects is quick and easy. Join Alex Theedom as he covers an array of topics, including how to use both the object model and the streaming model, how to traverse a JSON structure, and how to parse JSON data using the extensive builder APIs. When you wrap up this course, you'll be ready to develop with this essential and powerful API.
- Working with JSON and Java
- JSON-Processing API features
- The Java EE JSON object model
- Creating a model from a JSON string
- Building a JSON model
- Traversing the JSON model
- Outputting the JSON model to a data stream
- Parsing and writing JSON data
Skill Level Intermediate
Java Platforms Compared: SE vs EE vs MEwith Peggy Fisher25m 38s Intermediate
WebSocket Programming with Java EEwith Alex Theedom1h 29m Intermediate
1. JSON and Java
Work with JSON and Java3m 57s
2. JSON-Processing API Features
3. The Java EE JSON Object Model
4. The Java EE JSON Streaming Model
Next steps1m 19s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.