type Video struct { Id    string `json:"id"` Network string `json:"-"` Url   string `json:"url"` //derived field from configuration and id Title  string `json:"title"` Status  int   `json:"status"` Times PublishedAt NullTime   `json:"published_at"` Tags     StringSlice `json:"tags"` Author    Author    `json:"author"` Updater   Updater   `json:"updater"`}type Playlist struct { Id    string `json:"id"` Network string `json:"-"` Url   string `json:"url"` Title  string `json:"title"` Times PublishedAt NullTime `json:"published_at"` Author    Author  `json:"author"` Updater   Updater  `json:"updater"` Videos    Videos  `json:"videos"`}[  {    "id": "492b3478-acd6-40da-b357-a72d8655c018",    "title": "sci-fi",    "created_at": "2014-12-03T09:49:21.58386Z",    "updated_at": "2014-12-03T09:49:21.58386Z",    "deleted_at": null,    "published_at": null,    "author": {      "id": "539ea7af-d366-4d13-9446-d427fb72a910",      "url": "http://localhost:8080/company/users/539ea7af-d366-4d13-9446-d427fb72a910",      "email": "sn...@gmail.com",      "profile": {        "title": "geek"      }    },    "updater": {      "id": "539ea7af-d366-4d13-9446-d427fb72a910",      "url": "http://localhost:8080/company/users/539ea7af-d366-4d13-9446-d427fb72a910",      "email": "sn...@gmail.com",      "profile": {        "title": "geek"      }    },    "videos": [      {        "id": "df64a0a4-aa2b-4d96-8956-e9c324550b51",        "url": "http://localhost:8080/company/videos/df64a0a4-aa2b-4d96-8956-e9c324550b51"        "title": "Star Wars",        "status": 0,        "created_at": "2014-12-03T09:49:21.58386Z",        "updated_at": "2014-12-03T09:49:21.58386Z",        "deleted_at": null,        "published_at": null,        "tags": [          "dark"        ],        "author": {          "id": "539ea7af-d366-4d13-9446-d427fb72a910",          "url": "http://localhost:8080/company/users/539ea7af-d366-4d13-9446-d427fb72a910",          "email": "sn...@gmail.com",          "profile": {            "title": "geek"          }        },        "updater": {          "id": "539ea7af-d366-4d13-9446-d427fb72a910",          "url": "http://localhost:8080/company/users/539ea7af-d366-4d13-9446-d427fb72a910",          "email": "sn...@gmail.com",          "profile": {            "title": "geek"          }        },               }    ]  }]--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Alright, thank you.
Since I would prefer to avoid trashing memory for the intermediate representation since it is purely to format JSON, what are my options to limit garbage that is created?
Would using pointers in the intermediary and then referencing the value in the final object reduce the amount of garbage?
Ala,
var serializer struct {
 Id *string
}
video.Id = *serializer.IdThanks for any "pointers" in this area.