摘要: 结构体转换为xml: type Person struct { XMLName xml.Name `xml:"person"` Name string `xml:"name"` Age int `xml:"age"` Email string `xml:"email"` } func main() 阅读全文
posted @ 2022-06-14 21:08 nLesxw 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 解析嵌套类型示例: func test3() { b := []byte(`{"Name":"tom","Age":20,"Email":"tom@gmail.com", "Parents" : ["tom", "kite"]}`) var f map[string]interface{} json 阅读全文
posted @ 2022-06-14 18:10 nLesxw 阅读(18) 评论(0) 推荐(0) 编辑