Skip to content

Instantly share code, notes, and snippets.

@shumon84
Created August 28, 2018 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shumon84/4a334e973f480360bccf0af277bea2be to your computer and use it in GitHub Desktop.
Save shumon84/4a334e973f480360bccf0af277bea2be to your computer and use it in GitHub Desktop.
package main
import (
"encoding/json"
"fmt"
)
func main() {
prof := map[string]interface{}{
"name": "Yamada Tarou",
"age": 18,
"height": 178.5,
}
profJson, _ := json.Marshal(prof)
fmt.Println(string(profJson))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment