Introduction
In the previous chapter, we looked at errors in Go and discovered that, in Go, errors are values, which allows us to pass errors around as arguments to functions and methods. We also saw that Go functions can return multiple values, one of which is often an error. We learned that a good practice is to check for the value of an error returned by a function. By not ignoring the error, it prevents unexpected behavior in our program. In Go, we saw that you can create your own custom error types. Finally, we looked at panics and learned how to recover from them.
In this chapter, we will be working with JSON by using only the standard library of Go. Before we start looking at using JSON in Go code, let's have a brief introduction to JSON.