Skip to content

Instantly share code, notes, and snippets.

@bmhatfield
Created July 15, 2013 20:57
Show Gist options
  • Save bmhatfield/6003399 to your computer and use it in GitHub Desktop.
Save bmhatfield/6003399 to your computer and use it in GitHub Desktop.
computers
var fields map[string]interface{} = make(map[string]interface{})
func main() {
fields["device"] = json.RawMessage(`{"OMG": 13}`)
jsn, err := json.Marshal(fields)
if err == nil {
fmt.Println(string(jsn))
} else {
fmt.Println("Error:", err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment