exploit
1/31/2019 - 2:30 AM

json

package main

import (
	"fmt"
	"encoding/json"
)
type movie struct{
	// JSON 的值必须是可以导出的
	Title string `json:"movieTitle"`
	Actor []string  // json显示的 key 值
}

func main() {
	fmt.Println("Hello, playground")
	movies := []movie{
		{"a神探",[]string{"Hello","World"}},
		{"a黑衣",[]string{"heihei"}},
	}
	data,err := json.Marshal(movies)
	if err!=nil {
		//fmt.Println("err")
	}
	fmt.Printf("%s",data) //
	
}