Skip to content

Instantly share code, notes, and snippets.

@mayken
mayken / parse_json.go
Created March 30, 2020 19:07 — forked from mjohnsullivan/parse_json.go
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"
)