Structures and JSON
Let’s learn about structures and JSON records.
We'll cover the following...
We'll cover the following...
Coding example
Imagine that we have a Go structure that we want to convert into a JSON record without including any empty fields—the next widget illustrates how to perform that task with the use of omitempty:
Lastly, imagine that we have some sensitive data on some of the fields of a Go structure that we do not want to include in the JSON records. We can do ...