Go is great for parsing known JSON formats. But what if you don't know ahead of time what the JSON will look like? There are a few ways to handle this case in Go. On one hand, you can use the tokenizer and sequentially read through the JSON. On the other, you can simply parse the JSON into generic data types and inspect them at runtime. This short post shows how to go about this second way.
This simple example (with error handling removed) shows how to parse a JSON file into an empty inte...
Published on October 02, 2015 08:05