1import (
2 "fmt"
3 "github.com/clarketm/json" // drop-in replacement for `encoding/json`
4)
5
6type Result struct {
7 Data MyStruct `json:"data,omitempty"`
8 Status string `json:"status,omitempty"`
9 Reason string `json:"reason,omitempty"`
10}
11
12j, _ := json.Marshal(&Result{
13 Status: "204",
14 Reason: "No Content",
15})
16
17fmt.Println(string(j))
18