Go in 5 Minutes, episode 19.
This screencast teaches how to consume some unknown JSON. We don't know what it looks like
ahead of time, and we have to handle anything that comes our way.
We'll be using only the standard library for this, although we could also use some wonderful
packages out there to help. My favorite so far is Bitly's
go-simplejson.
I've always done this type of parsing myself, but I've started using go-simplejson
and really
like it. It's well designed and very easy to use!
Outline
- Basics of JSON Parsing in Go
- Handling different types with recursion :)
- Let's see an example!