Skip to content

Instantly share code, notes, and snippets.

@vireshas
Created June 1, 2017 09:12
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 vireshas/54becc25abe46ba98c4c7062e81e2845 to your computer and use it in GitHub Desktop.
Save vireshas/54becc25abe46ba98c4c7062e81e2845 to your computer and use it in GitHub Desktop.
json marshall in golang
package main
import (
"encoding/json"
"fmt"
)
func main() {
mapD := map[string]interface{}{"deploy_status": "public", "status": "live", "version": 2}
mapB, _ := json.Marshal(mapD)
fmt.Println(string(mapB))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment