golang的结构体,字典与json字符串之间的相互转换,json.Marshal()与json.Unmarshal()函数
1、结构体packagemainimport("encoding/json""fmt")typeUserstruct{NamestringAgeint64Heightfloat64Weightfloat64}funcmain(){user:=User{Name:"小花",Age:18,Height:162,Weight:42,}//struct--转-->jsonstringstr_json,er