{"action":"created","issue":{"url":"https://api.github.com/repos/akka/akka-http/issues/559","repository_url":"https://api.github.com/repos/akka/akka-http","labels_url":"https://api.github.com/repos/akka/akka-http/issues/559/labels{/name}","comments_url":"https://api.github.com/repos/akka/akka-http/issues/559/comments","events_url":"https://api.github.com/repos/akka/akka-http/issues/559/events","html_url":"https://github.com/akka/akka-http/issues/559","id":190578903,"number":559,"title":"Wrong Marshalling when Entity is `Optional`","user":{"login":"jlprat","id":3337739,"avatar_url":"https://avatars.githubusercontent.com/u/3337739?v=3","gravatar_id":"","url":"https://api.github.com/users/jlprat","html_url":"https://github.com/jlprat","followers_url":"https://api.github.com/users/jlprat/followers","following_url":"https://api.github.com/users/jlprat/following{/other_user}","gists_url":"https://api.github.com/users/jlprat/gists{/gist_id}","starred_url":"https://api.github.com/users/jlprat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlprat/subscriptions","organizations_url":"https://api.github.com/users/jlprat/orgs","repos_url":"https://api.github.com/users/jlprat/repos","events_url":"https://api.github.com/users/jlprat/events{/privacy}","received_events_url":"https://api.github.com/users/jlprat/received_events","type":"User","site_admin":false},"labels":[{"id":430145635,"url":"https://api.github.com/repos/akka/akka-http/labels/1%20-%20triaged","name":"1 - triaged","color":"5319e7","default":false},{"id":427494660,"url":"https://api.github.com/repos/akka/akka-http/labels/community","name":"community","color":"128A0C","default":false},{"id":439004088,"url":"https://api.github.com/repos/akka/akka-http/labels/t:routing","name":"t:routing","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-11-20T19:48:07Z","updated_at":"2016-11-23T13:56:11Z","closed_at":null,"body":"When completing a route with a Java `Optional` the output is not the one I would expect:\r\n## Expected Behavior\r\n* If `Optional[T]` is empty: completed with an empty `Entity`\r\n* If `Optional[T]` is not empty: completed with proper marshalling of `T`\r\n\r\n## Actual Behavior\r\n* If `Optional[T]` is empty: completed with `{\"present\": false}`\r\n* If `Optional[T]` is not empty: completed with `{\"present\": true}`\r\n\r\nI have a gist where one can reproduce this: https://gist.github.com/jlprat/5e1c27ce4b912e0a3eb0ad56237246d7\r\n"},"comment":{"url":"https://api.github.com/repos/akka/akka-http/issues/comments/262518564","html_url":"https://github.com/akka/akka-http/issues/559#issuecomment-262518564","issue_url":"https://api.github.com/repos/akka/akka-http/issues/559","id":262518564,"user":{"login":"ktoso","id":120979,"avatar_url":"https://avatars.githubusercontent.com/u/120979?v=3","gravatar_id":"","url":"https://api.github.com/users/ktoso","html_url":"https://github.com/ktoso","followers_url":"https://api.github.com/users/ktoso/followers","following_url":"https://api.github.com/users/ktoso/following{/other_user}","gists_url":"https://api.github.com/users/ktoso/gists{/gist_id}","starred_url":"https://api.github.com/users/ktoso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ktoso/subscriptions","organizations_url":"https://api.github.com/users/ktoso/orgs","repos_url":"https://api.github.com/users/ktoso/repos","events_url":"https://api.github.com/users/ktoso/events{/privacy}","received_events_url":"https://api.github.com/users/ktoso/received_events","type":"User","site_admin":false},"created_at":"2016-11-23T13:56:11Z","updated_at":"2016-11-23T13:56:11Z","body":"It should be consistent with how Scala/Option is handled.\r\nWe can upgrade the dependency if it's compatible - is it? // Note to self, enable MiMa validation\r\n`\"\"` is a bit weird since it could be seen as `Some(\"\")` - generally though we should make this consistent with what the scaladsl does now."}}
{"actor":{"display_login":"ktoso"}}