type JobTitles struct {
Titles []string `json:"titles"`
}
chiefTitles := []string{"CEO", "CFO", null, "CMO"}
jsonOut := JobTitles{chiefTitles}
In the code above, I would like to be able to send null as one of the values in my json string array. However, the above will not compile and if I add double quotes to null it becomes a string not the value null.
How can I send null in my json response in GO?
This article seems to help, but looks to be the inverse of my question..