Created
June 1, 2017 09:12
-
-
Save vireshas/54becc25abe46ba98c4c7062e81e2845 to your computer and use it in GitHub Desktop.
json marshall in golang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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