Working with JSON
Automating complex tasks can save hours of manual toil. In this section, we'll explore some techniques for working with JSON data, which is a common format that many command-line tools and APIs allow you to use. Later in the chapter, we'll show some examples of how you can use these techniques to easily create and publish content to a cloud website or Kubernetes cluster.
For this section, there is a sample JSON file in the accompanying code for the book. You can clone this code with Git from https://github.com/PacktPublishing/Windows-Subsystem-for-Linux-2-WSL-2-Tips-Tricks-and-Techniques. The sample JSON is called wsl-book.json
and is in the chapter-11/02-working-with-json
folder, and is based around a JSON description of the chapters and headings for a book. A snippet of this JSON is shown here:
{ Â Â Â Â "title": "WSL: Tips, Tricks and Techniques", Â Â Â Â "parts": [ Â Â Â ...