{"action":"created","issue":{"url":"https://api.github.com/repos/google/jsonapi/issues/83","repository_url":"https://api.github.com/repos/google/jsonapi","labels_url":"https://api.github.com/repos/google/jsonapi/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/google/jsonapi/issues/83/comments","events_url":"https://api.github.com/repos/google/jsonapi/issues/83/events","html_url":"https://github.com/google/jsonapi/issues/83","id":213223408,"number":83,"title":"omitempty for primary ID","user":{"login":"mitchellh","id":1299,"avatar_url":"https://avatars0.githubusercontent.com/u/1299?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellh","html_url":"https://github.com/mitchellh","followers_url":"https://api.github.com/users/mitchellh/followers","following_url":"https://api.github.com/users/mitchellh/following{/other_user}","gists_url":"https://api.github.com/users/mitchellh/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellh/subscriptions","organizations_url":"https://api.github.com/users/mitchellh/orgs","repos_url":"https://api.github.com/users/mitchellh/repos","events_url":"https://api.github.com/users/mitchellh/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-03-10T02:15:36Z","updated_at":"2017-03-10T09:27:35Z","closed_at":null,"body":"I'm using jsonapi to construct jsonapi documents as an API _client_ and when marshaling a resource for creation I'd like to omit the \"id\" since the implementation I'm using requires that (and appears spec compliant as far as I can tell). \r\n\r\nTo do this at the moment I have to reimplement `OnePayload` to have omitempty on the ID manually. "},"comment":{"url":"https://api.github.com/repos/google/jsonapi/issues/comments/285620296","html_url":"https://github.com/google/jsonapi/issues/83#issuecomment-285620296","issue_url":"https://api.github.com/repos/google/jsonapi/issues/83","id":285620296,"user":{"login":"mitchellh","id":1299,"avatar_url":"https://avatars0.githubusercontent.com/u/1299?v=3","gravatar_id":"","url":"https://api.github.com/users/mitchellh","html_url":"https://github.com/mitchellh","followers_url":"https://api.github.com/users/mitchellh/followers","following_url":"https://api.github.com/users/mitchellh/following{/other_user}","gists_url":"https://api.github.com/users/mitchellh/gists{/gist_id}","starred_url":"https://api.github.com/users/mitchellh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mitchellh/subscriptions","organizations_url":"https://api.github.com/users/mitchellh/orgs","repos_url":"https://api.github.com/users/mitchellh/repos","events_url":"https://api.github.com/users/mitchellh/events{/privacy}","received_events_url":"https://api.github.com/users/mitchellh/received_events","type":"User","site_admin":false},"created_at":"2017-03-10T09:27:35Z","updated_at":"2017-03-10T09:27:35Z","body":"Right, and the other issue is even if we could just annotate `jsonapi:\"primary,type,omitempty\"`, because `Node` doesn't have omitempty on ID, it would still transmit a blank ID. So eventually we'd have to get there anyways. :) "}}
{"actor":{"display_login":"mitchellh"}}