package main import ( "fmt" "encoding/json" "io" "os" ) func main() { in, _ := os.Open("example.json") contents, _ := io.ReadAll(in) var m map[string]interface{} json.Unmarshal(contents, &m) fmt.Printf("%v\n", m) }