Unmarshalling

Run Settings
LanguageGo
Language Version
Run Command
package main import ( "fmt" "encoding/json" ) type CobaStruct struct{ Coba *string `json:"cobaDong"` } func main() { values := map[string]string{ "cobaDong": "Platypus", } jsonValue, _ := json.Marshal(values) // var jsonBlob = []byte(`{"cobaDong": "Platypus"}`) dataRes := &CobaStruct{} err := json.Unmarshal(jsonValue, dataRes) if err != nil { fmt.Println("error:", err) } fmt.Printf("Cek =>%v\n", dataRes) }
Editor Settings
Theme
Key bindings
Full width
Lines