{"action":"created","issue":{"url":"https://api.github.com/repos/emberjs/data/issues/4166","repository_url":"https://api.github.com/repos/emberjs/data","labels_url":"https://api.github.com/repos/emberjs/data/issues/4166/labels{/name}","comments_url":"https://api.github.com/repos/emberjs/data/issues/4166/comments","events_url":"https://api.github.com/repos/emberjs/data/issues/4166/events","html_url":"https://github.com/emberjs/data/issues/4166","id":134229066,"number":4166,"title":"Record id always gets coerced to string","user":{"login":"ctusch","id":6949649,"avatar_url":"https://avatars.githubusercontent.com/u/6949649?v=3","gravatar_id":"","url":"https://api.github.com/users/ctusch","html_url":"https://github.com/ctusch","followers_url":"https://api.github.com/users/ctusch/followers","following_url":"https://api.github.com/users/ctusch/following{/other_user}","gists_url":"https://api.github.com/users/ctusch/gists{/gist_id}","starred_url":"https://api.github.com/users/ctusch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctusch/subscriptions","organizations_url":"https://api.github.com/users/ctusch/orgs","repos_url":"https://api.github.com/users/ctusch/repos","events_url":"https://api.github.com/users/ctusch/events{/privacy}","received_events_url":"https://api.github.com/users/ctusch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-17T09:39:30Z","updated_at":"2016-02-17T18:35:26Z","closed_at":null,"body":"I'm using Ember Data with JSON API. No matter what the type of a record's id is Ember Data always coerces it to string. When updating such a record this leads to wrong data types on the server. I haven't seen any possibility in Ember Data's sources to circumvent this."},"comment":{"url":"https://api.github.com/repos/emberjs/data/issues/comments/185340658","html_url":"https://github.com/emberjs/data/issues/4166#issuecomment-185340658","issue_url":"https://api.github.com/repos/emberjs/data/issues/4166","id":185340658,"user":{"login":"bmac","id":54056,"avatar_url":"https://avatars.githubusercontent.com/u/54056?v=3","gravatar_id":"","url":"https://api.github.com/users/bmac","html_url":"https://github.com/bmac","followers_url":"https://api.github.com/users/bmac/followers","following_url":"https://api.github.com/users/bmac/following{/other_user}","gists_url":"https://api.github.com/users/bmac/gists{/gist_id}","starred_url":"https://api.github.com/users/bmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmac/subscriptions","organizations_url":"https://api.github.com/users/bmac/orgs","repos_url":"https://api.github.com/users/bmac/repos","events_url":"https://api.github.com/users/bmac/events{/privacy}","received_events_url":"https://api.github.com/users/bmac/received_events","type":"User","site_admin":false},"created_at":"2016-02-17T18:35:26Z","updated_at":"2016-02-17T18:35:26Z","body":"Hi @ctusch. It should be possible to achieve this behavior in Ember Data by overriding the `serialize` method in your application serializer.\r\n\r\n\r\n```js\r\n// app/serializers/application.js\r\nexport default DS.JSONAPISerializer.extend({\r\n  serialize: function(snapshot, options) {\r\n    var serialized = this._super.apply(this, arguments);\r\n    serialized.data.id = parseInt(snapshot.id, 10);\r\n  }\r\n});\r\n```"}}