Skip to content

Commit

Permalink
add lower case upper case non-sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
mlycore committed Jan 22, 2018
1 parent fefb212 commit 2aeae32
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions json-capsule/json-capsule.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package main
import (
"encoding/json"
)

const data = `{"name": "liyao.miao"}`

type User struct {
// Name string `json:"name"`
Name string
}

func main( ){
u := &User{}
err := json.Unmarshal([]byte(data), u)
if err != nil {
panic(err)
}

println(u.Name)
}

0 comments on commit 2aeae32

Please sign in to comment.