Hacker News new | ask | show | jobs
by nphase 4797 days ago
> If you’re using JSON and your JSON is a mix of types, goooooood luck. You’ll have to create a custom struct that matches the format of your JSON blob, and then Unmarshall the raw json into an instance of your custom struct. Much more work than just obj = json.loads(json_blob) like we’re used to in Python land.

I believe you can use json.NewEncoder().Encode() to arbitrarily deal with interface{}'s