Skip to content

Instantly share code, notes, and snippets.

@zmalltalker
Created April 21, 2017 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zmalltalker/0ae4bd855e963c62758bd13ecca8aa2e to your computer and use it in GitHub Desktop.
Save zmalltalker/0ae4bd855e963c62758bd13ecca8aa2e to your computer and use it in GitHub Desktop.
type User struct {
CreatedAt time.Time `json:"created_at,string"`
UpdatedAt time.Time `json:"updated_at,string"`
FirstName string `json:"first_name,string"`
LastName string `json:"last_name,string"`
}
data = "{…json…}"
var u User
err := json.Unmarshal(data, &u)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment