From the course: Java 8+ Essential Training: Objects and APIs

Unlock the full course today

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

Parse a JSON file

Parse a JSON file - Java Tutorial

From the course: Java 8+ Essential Training: Objects and APIs

Start my 1-month free trial

Parse a JSON file

- [Instructor] There are many tasks that Java doesn't provide tools for. For example, if you want to parse files that are in the JSON data format, you won't find anything in the library that does it for you. That's a feature that was intended to be part of a number of versions of Java but it's just never been released as part of the core product. So instead, you tend to go looking for open source libraries that do the work you need to do. There are many of these in the Java world and for JSON, one of these tools is called Gson. You'll find it here on GitHub. It's an open source library and it's completely free. It was created by Google, but anybody can download this code and use it in their applications. There are many different ways to use a Java library and each library is responsible for giving you the instructions. There are tools for incorporating libraries through something called dependencies, but that goes beyond what we're working on in this course, which is the core…

Contents