{"action":"created","issue":{"url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/26","labels_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/26/comments","events_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/26/events","html_url":"https://github.com/Hearst-DD/ObjectMapper/issues/26","id":53710412,"number":26,"title":"Non-optional mapping","user":{"login":"michaeleisel","id":718607,"avatar_url":"https://avatars.githubusercontent.com/u/718607?v=3","gravatar_id":"","url":"https://api.github.com/users/michaeleisel","html_url":"https://github.com/michaeleisel","followers_url":"https://api.github.com/users/michaeleisel/followers","following_url":"https://api.github.com/users/michaeleisel/following{/other_user}","gists_url":"https://api.github.com/users/michaeleisel/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeleisel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeleisel/subscriptions","organizations_url":"https://api.github.com/users/michaeleisel/orgs","repos_url":"https://api.github.com/users/michaeleisel/repos","events_url":"https://api.github.com/users/michaeleisel/events{/privacy}","received_events_url":"https://api.github.com/users/michaeleisel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-08T03:18:51Z","updated_at":"2016-02-01T19:16:45Z","closed_at":"2015-03-02T18:49:49Z","body":"I want to create an object from JSON, but if any of the properties aren't set successfully, e.g. the corresponding JSON value is missing or malformed, I want to return a nil object. The upside is that I can then assume that any object created from JSON has all of the required properties, and thus I don't need to use optionals. Is there a way to do this?"},"comment":{"url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/comments/178137929","html_url":"https://github.com/Hearst-DD/ObjectMapper/issues/26#issuecomment-178137929","issue_url":"https://api.github.com/repos/Hearst-DD/ObjectMapper/issues/26","id":178137929,"user":{"login":"ldiqual","id":941453,"avatar_url":"https://avatars.githubusercontent.com/u/941453?v=3","gravatar_id":"","url":"https://api.github.com/users/ldiqual","html_url":"https://github.com/ldiqual","followers_url":"https://api.github.com/users/ldiqual/followers","following_url":"https://api.github.com/users/ldiqual/following{/other_user}","gists_url":"https://api.github.com/users/ldiqual/gists{/gist_id}","starred_url":"https://api.github.com/users/ldiqual/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ldiqual/subscriptions","organizations_url":"https://api.github.com/users/ldiqual/orgs","repos_url":"https://api.github.com/users/ldiqual/repos","events_url":"https://api.github.com/users/ldiqual/events{/privacy}","received_events_url":"https://api.github.com/users/ldiqual/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T19:16:45Z","updated_at":"2016-02-01T19:16:45Z","body":"@tristanhimmelman Is there an open issue where you're tracking ideas & future developments for official support of non-optional mapping? I understand that it's not possible (or not very elegant) at the moment, but it'd be awesome to gather the current recommended way to do it and brainstorm on other solutions in a single place."}}