💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
``` package main import ( "encoding/json" "fmt" ) type Block struct {     Type    string `json:"type"`//除非json中的key也是大写,否则即使名称一样也无法转换     Title string `json:"title"`     Icon    string `json:"icon"`     Piclist []string `json:"piclist"` } func main() {     str := `{         "type": "showPics",         "title": "校历",         "icon": "/assets/images/index/calender.png",         "piclist": [ "http://jwb.xujc.com/\_upload/article/images/93/d5/56c5a1924d0eba890083b77d4247/be6363d8-a8a6-4846-a605-237b289f0c31.jpg"         ]     }`     var block Block     err := json.Unmarshal(\[\]byte(str), &block)     if err != nil {         fmt.Printf("反序列化失败:%v\\n", err)         return     }     fmt.Println(block) } ```