Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save adriacidre/39be02eb459962314b2f21f40bcc5531 to your computer and use it in GitHub Desktop.
Save adriacidre/39be02eb459962314b2f21f40bcc5531 to your computer and use it in GitHub Desktop.
jcart, _ := json.MarshalIndent(cart, "", "\t")
fmt.Println(string(jcart))
/*
{
"account_number": 1,
"fruits": [
"apple",
"peach",
"pear"
]
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment