Monthly Archives: November 2019
The challenge of type asserting []interface{} to string slices.
- Posted by Michael MacDonald
- on Nov, 12, 2019
- in Go
- Blog No Comments.
When working with JSON data it can be easy to silently miss converting data, if one is not doing the typical unmarshalling into a well defined struct but instead into a generic map[string]interface{}. Given the following data block: We can unmarshal it via If we then try and extract the data element and convert it […]
Read MoreRecent Posts
- The shape of structured data
- Writing very small executable
- The challenge of type asserting []interface{} to string slices.
- Serializing/Deserializing a complex GO struct to store externally (i.e. in a database, redis, or text file)
- Fun with golang, Google Maps api, and proxying requests