Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

黄成意 / go_sku_server

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Find file
Normal viewHistoryPermalink
Switch branch/tag
  • go_sku_server
  • doc
  • test3
  • struct_json.go
struct_json.go 239 Bytes
wang's avatar
解决冲突
ad60817b
 
wang committed 4 years ago
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
package main

import (
	"encoding/json"
	"fmt"
)

type Testjson struct {
	Name interface{} `json:"name"`
}

func main()  {

	strJson:=`{"name":"123"}`
	testjson:=&Testjson{}
	json.Unmarshal([]byte(strJson),&testjson)
	fmt.Print(testjson)
}