Skip to content

Instantly share code, notes, and snippets.

@steinelu
Created April 7, 2020 21:49
Show Gist options
  • Select an option

  • Save steinelu/310a77fec17bae957cae110baf75bbfb to your computer and use it in GitHub Desktop.

Select an option

Save steinelu/310a77fec17bae957cae110baf75bbfb to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
"encoding/json"
)
func main() {
dict := make(map[int]string)
dict[12] = "Lukas"
data, _ := json.Marshal(dict)
dict_ := make(map[int]string)
_ = json.Unmarshal([]byte(data), &dict_)
fmt.Println(string(data))
fmt.Println(dict_)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment