Last active
December 16, 2021 17:50
-
-
Save vaguecoder/e8b1291deb4b689cce5304a79230d09e to your computer and use it in GitHub Desktop.
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
var jsonData []byte | |
jsonData, err = json.Marshal(data) | |
if err != nil { | |
// Handle Error | |
} | |
fmt.Println(jsonData) // JSON data in bytes | |
fmt.Println(string(jsonData)) // String for format verification |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment