{"action":"created","issue":{"url":"https://api.github.com/repos/thoughtbot/Argo/issues/42","labels_url":"https://api.github.com/repos/thoughtbot/Argo/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/thoughtbot/Argo/issues/42/comments","events_url":"https://api.github.com/repos/thoughtbot/Argo/issues/42/events","html_url":"https://github.com/thoughtbot/Argo/issues/42","id":56376751,"number":42,"title":"Add JSONEncodable as well?","user":{"login":"nvh","id":248861,"avatar_url":"https://avatars.githubusercontent.com/u/248861?v=3","gravatar_id":"","url":"https://api.github.com/users/nvh","html_url":"https://github.com/nvh","followers_url":"https://api.github.com/users/nvh/followers","following_url":"https://api.github.com/users/nvh/following{/other_user}","gists_url":"https://api.github.com/users/nvh/gists{/gist_id}","starred_url":"https://api.github.com/users/nvh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nvh/subscriptions","organizations_url":"https://api.github.com/users/nvh/orgs","repos_url":"https://api.github.com/users/nvh/repos","events_url":"https://api.github.com/users/nvh/events{/privacy}","received_events_url":"https://api.github.com/users/nvh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-03T13:23:34Z","updated_at":"2015-02-03T21:25:46Z","closed_at":null,"body":"I don't know if it's seen as in the scope of this project, but wouldn't it be nice to have a JSONEncodable protocol as well? Something like this:\r\n```swift\r\npublic protocol JSONEncodable {\r\n  func encode() -> JSONValue\r\n}\r\n```\r\n\r\nWith some smart use of the LiteralConvertible protocols the implementation could look something like this:\r\n```swift\r\nextension User: JSONEncodable {\r\n  func encode() -> JSONValue {\r\n    return [\"id\":id,\"name\":name,\"email\":email]\r\n  }\r\n}\r\n```\r\nI've made an example of this in my fork of Argo: https://github.com/nvh/Argo/blob/master/Argo/Globals/JSONValue.swift#L95\r\n\r\nWill this be something worth making a pull request from?\r\n"},"comment":{"url":"https://api.github.com/repos/thoughtbot/Argo/issues/comments/72738138","html_url":"https://github.com/thoughtbot/Argo/issues/42#issuecomment-72738138","issue_url":"https://api.github.com/repos/thoughtbot/Argo/issues/42","id":72738138,"user":{"login":"tonyd256","id":1169797,"avatar_url":"https://avatars.githubusercontent.com/u/1169797?v=3","gravatar_id":"","url":"https://api.github.com/users/tonyd256","html_url":"https://github.com/tonyd256","followers_url":"https://api.github.com/users/tonyd256/followers","following_url":"https://api.github.com/users/tonyd256/following{/other_user}","gists_url":"https://api.github.com/users/tonyd256/gists{/gist_id}","starred_url":"https://api.github.com/users/tonyd256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonyd256/subscriptions","organizations_url":"https://api.github.com/users/tonyd256/orgs","repos_url":"https://api.github.com/users/tonyd256/repos","events_url":"https://api.github.com/users/tonyd256/events{/privacy}","received_events_url":"https://api.github.com/users/tonyd256/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T21:25:46Z","updated_at":"2015-02-03T21:25:46Z","body":"I don't understand why you need to convert it to a string? I've just been using `NSJSONSerialization.dataWithJSONObject:error:` to convert my `AnyObject` to the appropriate `NSData` then attach it to the `NSRequest`. You don't need to maintain type info or worry about converting it to a string manually."}}