Skip to content

Instantly share code, notes, and snippets.

@0rka
Created January 28, 2018 11:32
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 0rka/8ec7f8d0ef07d5511d3fe073d05dbb77 to your computer and use it in GitHub Desktop.
Save 0rka/8ec7f8d0ef07d5511d3fe073d05dbb77 to your computer and use it in GitHub Desktop.
usage example
func main() {
myjson := []byte(`{"company":"0rkaTV","notices":"NO RUNNING WITH SCISSORS","id":"0x1337H4X0R","library":{"movies":[{"title":"Titanic","length":194},{"title":"Matrix","length":150}]}}`)
var OrkaTVGuide TVGuide
if err := json.Unmarshal(myjson, &OrkaTVGuide); err != nil {
fmt.Println(err)
}
fmt.Println(OrkaTVGuide)
fmt.Println("Hello, playground")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment