{"Name":"Wednesday","Age":6,"Parents":["Gomez","Morticia"]}
ouput:Age is of a type I don't know how tu handle. json numbers type for go float64 type.
This commit is contained in:
@@ -88,6 +88,8 @@ JSON(Javascript Object Notation)是一种轻量级的数据交换语言,
|
||||
fmt.Println(k, "is string", vv)
|
||||
case int:
|
||||
fmt.Println(k, "is int", vv)
|
||||
case float64:
|
||||
fmt.Println(k,"is float64",vv)
|
||||
case []interface{}:
|
||||
fmt.Println(k, "is an array:")
|
||||
for i, u := range vv {
|
||||
|
||||
Reference in New Issue
Block a user