AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
[TOC] ## 定义一个结构体 ``` type configType struct { Enabled bool `json:"enabled"` Buffer int `json:"buffer"` AppKey string `json:"appkey"` MasterSecret string `json:"masterSecret"` ApiUrl string `json:"apiUrl"` Platform []string `json:"Platform"` } ``` ## struct 转json ``` ``` ## json 转 struct ``` pushConfig := "" if err := json.Unmarshal([]byte(jPushConfig), &config); err !=nil { logger.Logger.Error("jPushConfig json parse error") return nil } ```