示例#1
0
文件: main.go 项目: mabetle/mcore
func DemoOne() {
	m := Demo{}
	m.Name = "demo"
	m.Age = 20

	str := mjson.Marshal(m)
	println(str)

	var um = Demo{}
	mjson.Unmarshal(str, &um)
	println(um.Name)
}
示例#2
0
文件: main.go 项目: mabetle/mcore
func MarshalInterface(rows interface{}) {
	str := mjson.Marshal(rows)
	fmt.Println(str)
}