From the course: JSON Processing with Java EE

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Challenge: Find the value of a JSON key

Challenge: Find the value of a JSON key

From the course: JSON Processing with Java EE

Start my 1-month free trial

Challenge: Find the value of a JSON key

(chiming music) - [Instructor] This is your first challenge in the string of the chapter and it is to write the method that traverses a JSON document and retrieves a value of a given key. You should be able to call a method retrieveValue and parser the key name and a JSON string to parse. To make it simple, let's just make it return a value. If the key's value is a string or a number, we don't need to write logic that returns an array or an object. And don't forget, write the appropriate unit tests. The estimated completion time for this task is about 20 minutes.

Contents