{"action":"opened","number":31,"pull_request":{"url":"https://api.github.com/repos/dcjones/YAML.jl/pulls/31","id":65882242,"html_url":"https://github.com/dcjones/YAML.jl/pull/31","diff_url":"https://github.com/dcjones/YAML.jl/pull/31.diff","patch_url":"https://github.com/dcjones/YAML.jl/pull/31.patch","issue_url":"https://api.github.com/repos/dcjones/YAML.jl/issues/31","number":31,"state":"open","locked":false,"title":"Deserialization of YAML into composite types","user":{"login":"erikedin","id":324535,"avatar_url":"https://avatars.githubusercontent.com/u/324535?v=3","gravatar_id":"","url":"https://api.github.com/users/erikedin","html_url":"https://github.com/erikedin","followers_url":"https://api.github.com/users/erikedin/followers","following_url":"https://api.github.com/users/erikedin/following{/other_user}","gists_url":"https://api.github.com/users/erikedin/gists{/gist_id}","starred_url":"https://api.github.com/users/erikedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikedin/subscriptions","organizations_url":"https://api.github.com/users/erikedin/orgs","repos_url":"https://api.github.com/users/erikedin/repos","events_url":"https://api.github.com/users/erikedin/events{/privacy}","received_events_url":"https://api.github.com/users/erikedin/received_events","type":"User","site_admin":false},"body":"This adds a feature to deserialize YAML into composite Julia types. For instance, one can deserialize the yaml in `data` directly into a user defined type:\r\n\r\n```\r\nimport YAML\r\n\r\ndata = \"\"\"\r\nname: Mark McGwire\r\nhr:   65\r\navg:  0.278\r\n\"\"\"\r\n\r\nimmutable NameHrAvg\r\n  name::AbstractString\r\n  hr::Int\r\n  avg::Float64\r\nend\r\n\r\nyaml = YAML.load(data)\r\nx = YAML.deserialize(NameHrAvg, yaml)\r\nprintln(x)\r\n```\r\n\r\nprints\r\n\r\n```\r\nNameHrAvg(\"Mark McGwire\",65,0.278)\r\n```\r\n\r\nOriginally written by @tlycken for JSON, adapted by me for YAML.","created_at":"2016-04-09T14:24:05Z","updated_at":"2016-04-09T14:24:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dcjones/YAML.jl/pulls/31/commits","review_comments_url":"https://api.github.com/repos/dcjones/YAML.jl/pulls/31/comments","review_comment_url":"https://api.github.com/repos/dcjones/YAML.jl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dcjones/YAML.jl/issues/31/comments","statuses_url":"https://api.github.com/repos/dcjones/YAML.jl/statuses/2ab38bb129a52c848c3f1c73d1d05e3e423c38b6","head":{"label":"dandeliondeathray:feature_deserialization","ref":"feature_deserialization","sha":"2ab38bb129a52c848c3f1c73d1d05e3e423c38b6","user":{"login":"dandeliondeathray","id":17503836,"avatar_url":"https://avatars.githubusercontent.com/u/17503836?v=3","gravatar_id":"","url":"https://api.github.com/users/dandeliondeathray","html_url":"https://github.com/dandeliondeathray","followers_url":"https://api.github.com/users/dandeliondeathray/followers","following_url":"https://api.github.com/users/dandeliondeathray/following{/other_user}","gists_url":"https://api.github.com/users/dandeliondeathray/gists{/gist_id}","starred_url":"https://api.github.com/users/dandeliondeathray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dandeliondeathray/subscriptions","organizations_url":"https://api.github.com/users/dandeliondeathray/orgs","repos_url":"https://api.github.com/users/dandeliondeathray/repos","events_url":"https://api.github.com/users/dandeliondeathray/events{/privacy}","received_events_url":"https://api.github.com/users/dandeliondeathray/received_events","type":"Organization","site_admin":false},"repo":{"id":55840083,"name":"YAML.jl","full_name":"dandeliondeathray/YAML.jl","owner":{"login":"dandeliondeathray","id":17503836,"avatar_url":"https://avatars.githubusercontent.com/u/17503836?v=3","gravatar_id":"","url":"https://api.github.com/users/dandeliondeathray","html_url":"https://github.com/dandeliondeathray","followers_url":"https://api.github.com/users/dandeliondeathray/followers","following_url":"https://api.github.com/users/dandeliondeathray/following{/other_user}","gists_url":"https://api.github.com/users/dandeliondeathray/gists{/gist_id}","starred_url":"https://api.github.com/users/dandeliondeathray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dandeliondeathray/subscriptions","organizations_url":"https://api.github.com/users/dandeliondeathray/orgs","repos_url":"https://api.github.com/users/dandeliondeathray/repos","events_url":"https://api.github.com/users/dandeliondeathray/events{/privacy}","received_events_url":"https://api.github.com/users/dandeliondeathray/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dandeliondeathray/YAML.jl","description":"Parse yer YAMLs","fork":true,"url":"https://api.github.com/repos/dandeliondeathray/YAML.jl","forks_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/forks","keys_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/teams","hooks_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/hooks","issue_events_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/issues/events{/number}","events_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/events","assignees_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/assignees{/user}","branches_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/branches{/branch}","tags_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/tags","blobs_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/languages","stargazers_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/stargazers","contributors_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/contributors","subscribers_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/subscribers","subscription_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/subscription","commits_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/contents/{+path}","compare_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/merges","archive_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/downloads","issues_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/issues{/number}","pulls_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/labels{/name}","releases_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/releases{/id}","deployments_url":"https://api.github.com/repos/dandeliondeathray/YAML.jl/deployments","created_at":"2016-04-09T11:13:04Z","updated_at":"2016-04-09T11:13:04Z","pushed_at":"2016-04-09T14:11:48Z","git_url":"git://github.com/dandeliondeathray/YAML.jl.git","ssh_url":"git@github.com:dandeliondeathray/YAML.jl.git","clone_url":"https://github.com/dandeliondeathray/YAML.jl.git","svn_url":"https://github.com/dandeliondeathray/YAML.jl","homepage":"","size":93,"stargazers_count":0,"watchers_count":0,"language":"Julia","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dcjones:master","ref":"master","sha":"b2ced667ec999c35d531cc03254796c3d0471af1","user":{"login":"dcjones","id":210361,"avatar_url":"https://avatars.githubusercontent.com/u/210361?v=3","gravatar_id":"","url":"https://api.github.com/users/dcjones","html_url":"https://github.com/dcjones","followers_url":"https://api.github.com/users/dcjones/followers","following_url":"https://api.github.com/users/dcjones/following{/other_user}","gists_url":"https://api.github.com/users/dcjones/gists{/gist_id}","starred_url":"https://api.github.com/users/dcjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcjones/subscriptions","organizations_url":"https://api.github.com/users/dcjones/orgs","repos_url":"https://api.github.com/users/dcjones/repos","events_url":"https://api.github.com/users/dcjones/events{/privacy}","received_events_url":"https://api.github.com/users/dcjones/received_events","type":"User","site_admin":false},"repo":{"id":8127815,"name":"YAML.jl","full_name":"dcjones/YAML.jl","owner":{"login":"dcjones","id":210361,"avatar_url":"https://avatars.githubusercontent.com/u/210361?v=3","gravatar_id":"","url":"https://api.github.com/users/dcjones","html_url":"https://github.com/dcjones","followers_url":"https://api.github.com/users/dcjones/followers","following_url":"https://api.github.com/users/dcjones/following{/other_user}","gists_url":"https://api.github.com/users/dcjones/gists{/gist_id}","starred_url":"https://api.github.com/users/dcjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcjones/subscriptions","organizations_url":"https://api.github.com/users/dcjones/orgs","repos_url":"https://api.github.com/users/dcjones/repos","events_url":"https://api.github.com/users/dcjones/events{/privacy}","received_events_url":"https://api.github.com/users/dcjones/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dcjones/YAML.jl","description":"Parse yer YAMLs","fork":false,"url":"https://api.github.com/repos/dcjones/YAML.jl","forks_url":"https://api.github.com/repos/dcjones/YAML.jl/forks","keys_url":"https://api.github.com/repos/dcjones/YAML.jl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcjones/YAML.jl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcjones/YAML.jl/teams","hooks_url":"https://api.github.com/repos/dcjones/YAML.jl/hooks","issue_events_url":"https://api.github.com/repos/dcjones/YAML.jl/issues/events{/number}","events_url":"https://api.github.com/repos/dcjones/YAML.jl/events","assignees_url":"https://api.github.com/repos/dcjones/YAML.jl/assignees{/user}","branches_url":"https://api.github.com/repos/dcjones/YAML.jl/branches{/branch}","tags_url":"https://api.github.com/repos/dcjones/YAML.jl/tags","blobs_url":"https://api.github.com/repos/dcjones/YAML.jl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcjones/YAML.jl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcjones/YAML.jl/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcjones/YAML.jl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcjones/YAML.jl/statuses/{sha}","languages_url":"https://api.github.com/repos/dcjones/YAML.jl/languages","stargazers_url":"https://api.github.com/repos/dcjones/YAML.jl/stargazers","contributors_url":"https://api.github.com/repos/dcjones/YAML.jl/contributors","subscribers_url":"https://api.github.com/repos/dcjones/YAML.jl/subscribers","subscription_url":"https://api.github.com/repos/dcjones/YAML.jl/subscription","commits_url":"https://api.github.com/repos/dcjones/YAML.jl/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcjones/YAML.jl/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcjones/YAML.jl/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcjones/YAML.jl/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcjones/YAML.jl/contents/{+path}","compare_url":"https://api.github.com/repos/dcjones/YAML.jl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcjones/YAML.jl/merges","archive_url":"https://api.github.com/repos/dcjones/YAML.jl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcjones/YAML.jl/downloads","issues_url":"https://api.github.com/repos/dcjones/YAML.jl/issues{/number}","pulls_url":"https://api.github.com/repos/dcjones/YAML.jl/pulls{/number}","milestones_url":"https://api.github.com/repos/dcjones/YAML.jl/milestones{/number}","notifications_url":"https://api.github.com/repos/dcjones/YAML.jl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcjones/YAML.jl/labels{/name}","releases_url":"https://api.github.com/repos/dcjones/YAML.jl/releases{/id}","deployments_url":"https://api.github.com/repos/dcjones/YAML.jl/deployments","created_at":"2013-02-10T20:45:25Z","updated_at":"2016-02-18T09:44:22Z","pushed_at":"2015-12-10T18:32:26Z","git_url":"git://github.com/dcjones/YAML.jl.git","ssh_url":"git@github.com:dcjones/YAML.jl.git","clone_url":"https://github.com/dcjones/YAML.jl.git","svn_url":"https://github.com/dcjones/YAML.jl","homepage":"","size":366,"stargazers_count":13,"watchers_count":13,"language":"Julia","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":9,"forks":12,"open_issues":9,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dcjones/YAML.jl/pulls/31"},"html":{"href":"https://github.com/dcjones/YAML.jl/pull/31"},"issue":{"href":"https://api.github.com/repos/dcjones/YAML.jl/issues/31"},"comments":{"href":"https://api.github.com/repos/dcjones/YAML.jl/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/dcjones/YAML.jl/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/dcjones/YAML.jl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dcjones/YAML.jl/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/dcjones/YAML.jl/statuses/2ab38bb129a52c848c3f1c73d1d05e3e423c38b6"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":145,"deletions":1,"changed_files":8}}