Ruby: Deserialize JSON to an OpenStruct
Deserializing JSON from API responses, files and the like is a pretty common task. Depending on the complexity of the JSON structure, this can be a bit difficult to work with though, since the default action of JSON.parse is to deserialize to a string-key Hash. This means that after parsing the JSON, there’s a lot of fetching, diging, and the...