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) }
func MarshalInterface(rows interface{}) { str := mjson.Marshal(rows) fmt.Println(str) }