package trello import "encoding/json" func UnmarshalChecklist(data []byte) (Checklist, error) { var r Checklist err := json.Unmarshal(data, &r) return r, err } func (r *Checklist) Marshal() ([]byte, error) { return json.Marshal(r) } type Checklist struct { ID string `json:"id"` Name string `json:"name"` IDBoard string `json:"idBoard"` IDCard string `json:"idCard"` Pos int64 `json:"pos"` CheckItems []CheckItem `json:"checkItems"` } type CheckItem struct { State string `json:"state"` IDChecklist string `json:"idChecklist"` ID string `json:"id"` Name string `json:"name"` NameData interface{} `json:"nameData"` Pos int64 `json:"pos"` }