package main
import (
"encoding/json"
"log"
"regexp"
)
type T struct {
A int
}
func main() {
m := new(T)
log.Println(json.Unmarshal([]byte(`{"a":1}`), m))
log.Println(m)
}
package main
import (
"encoding/json"
"log"
"regexp"
)
type T struct {
A int
}
func main() {
m := new(T)
log.Println(json.Unmarshal([]byte(`{"a":1}`), m))
log.Println(m)
}
本文标题:json解析自动取二级指针的值
本文链接:https://www.haomeiwen.com/subject/pgyykctx.html
网友评论