remove _ in names
This commit is contained in:
parent
829db87c40
commit
3af7344581
1270 changed files with 0 additions and 18916 deletions
|
|
@ -1,25 +0,0 @@
|
|||
package main
|
||||
|
||||
import "encoding/json"
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
var data interface{}
|
||||
err := json.Unmarshal([]byte(`{"foo":1, "bar":[10, "apples"]}`), &data)
|
||||
if err == nil {
|
||||
fmt.Println(data)
|
||||
} else {
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
sample := map[string]interface{}{
|
||||
"blue": []interface{}{1, 2},
|
||||
"ocean": "water",
|
||||
}
|
||||
json_string, err := json.Marshal(sample)
|
||||
if err == nil {
|
||||
fmt.Println(string(json_string))
|
||||
} else {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue