{"action":"opened","issue":{"url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/435","repository_url":"https://api.github.com/repos/jamesagnew/hapi-fhir","labels_url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/435/labels{/name}","comments_url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/435/comments","events_url":"https://api.github.com/repos/jamesagnew/hapi-fhir/issues/435/events","html_url":"https://github.com/jamesagnew/hapi-fhir/issues/435","id":174499929,"number":435,"title":"Binary resource is not parse in proper way","user":{"login":"petromykhailysyn","id":9278620,"avatar_url":"https://avatars.githubusercontent.com/u/9278620?v=3","gravatar_id":"","url":"https://api.github.com/users/petromykhailysyn","html_url":"https://github.com/petromykhailysyn","followers_url":"https://api.github.com/users/petromykhailysyn/followers","following_url":"https://api.github.com/users/petromykhailysyn/following{/other_user}","gists_url":"https://api.github.com/users/petromykhailysyn/gists{/gist_id}","starred_url":"https://api.github.com/users/petromykhailysyn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petromykhailysyn/subscriptions","organizations_url":"https://api.github.com/users/petromykhailysyn/orgs","repos_url":"https://api.github.com/users/petromykhailysyn/repos","events_url":"https://api.github.com/users/petromykhailysyn/events{/privacy}","received_events_url":"https://api.github.com/users/petromykhailysyn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-01T11:28:02Z","updated_at":"2016-09-01T11:28:02Z","closed_at":null,"body":"Hello,\r\nWhile parsing Binary resource we lost undeclared extensions:\r\n        byte[] arr = {23,21,74,123,-44};\r\n\r\n        Binary binary = new Binary();\r\n        binary.setId(new IdDt(\"hello\"));\r\n        binary.setLanguage(new CodeDt(\"bob\"));\r\n        binary.setContent(arr);\r\n        binary.setContentType(\"dansk\");\r\n        binary.addUndeclaredExtension(true, \"bobobo\", new StringDt(\"hey there\"));\r\n\r\n        IParser parser = FhirContext.forDstu2().newXmlParser();\r\n        String xml = parser.encodeResourceToString(binary);\r\n\r\nxml = <Binary xmlns=\"http://hl7.org/fhir\"><id value=\"hello\"/><contentType value=\"dansk\"/><content value=\"FxVKe9Q=\"/></Binary>\r\n\r\nSeems that only id, content and contentType survive after parsing.\r\n\r\n/Petro\r\n"}}
{"actor":{"display_login":"petromykhailysyn"}}