import "encoding/json"
ptjsonpath:="./pt.json"
f, err := os.Open(ptjsonpath)
if err != nil {
fmt.Println("open file err = ", err)
return
}
defer f.Close()
siteinfos:=make(map[string]Siteinfo)
decoder := json.NewDecoder(f)
err = decoder.Decode(&siteinfos)
if err != nil {
fmt.Printf("json decode has error:%v\n", err)
}
fmt.Println("json read done well")
fmt.Print(siteinfos)
fmt.Println(siteinfos["1"].Name)