Join Alex Theedom for an in-depth discussion in this video Solution: JSON array object, part of JSON Processing with Java EE.
- [Instructor] So, how did you find your first challenge?…Well, that challenge had two parts.…Write code that loads a file containing a JSON…and array and parse it into an object.…And secondly, to write an appropriate unit test.…So, let's start with the code part.…As you can see here, the code is very similar…to the code we wrote in the load JSON object method.…The only difference is the method we call…on the read object.…This method reads the JSON data as JSON array,…rather than as JSON object.…It is important to note that if the data in the file…is not actually a JSON array, the parse will not…be able to read it and will throw a JSON parsing exception.…
So, you have to be sure of the data format if you wish…to use this method.…Alternatively, if you're not sure of the data structure,…you could use the read method.…This method returns a JSON structure, which represents…all JSON structures.…And then use the get value type to determine its type.…To see an example of this, take a look at the load…JSON structure method and associated test.…
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?
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.