Skip to content

Instantly share code, notes, and snippets.

@fsouza
Created September 12, 2012 14:38
Show Gist options
  • Save fsouza/3707058 to your computer and use it in GitHub Desktop.
Save fsouza/3707058 to your computer and use it in GitHub Desktop.
func (a *App) MarshalJSON() ([]byte, error) {
var result map[string]interface{}
result["name"] = a.Name
result["state"] = a.State()
result["platform"] = a.Platform
...
return json.Marshal(result)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment