Hacker News new | ask | show | jobs
by landr0id 4212 days ago
> There is no easy way to sort of "parse" json piece by piece

You mean like this? http://play.golang.org/p/mMh7HGuTbe

1 comments

You're still parsing the entire JSON document at once. I believe what OP meant was getting a nested property without all the overhead of writing structs or parsing the entire JSON object into an interface{}, []string, map or whatever else is appropriate.
The jason package implementation decodes the entire JSON object to an interface{} using the standard encoding/json package.