Skip to content

Instantly share code, notes, and snippets.

View ankit-sahu's full-sized avatar

Ankit Sahu ankit-sahu

View GitHub Profile
@mjohnsullivan
mjohnsullivan / parse_json.go
Created December 14, 2015 23:17
Parse JSON objects with arbitrary key names in Go using interfaces and type assertions
// Parsing arbitrary JSON using interfaces in Go
// Demonstrates how to parse JSON with abritrary key names
// See https://blog.golang.org/json-and-go for more info on generic JSON parsing
package main
import (
"encoding/json"
"fmt"
)