{"action":"created","issue":{"url":"https://api.github.com/repos/scalapb/ScalaPB/issues/247","repository_url":"https://api.github.com/repos/scalapb/ScalaPB","labels_url":"https://api.github.com/repos/scalapb/ScalaPB/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/scalapb/ScalaPB/issues/247/comments","events_url":"https://api.github.com/repos/scalapb/ScalaPB/issues/247/events","html_url":"https://github.com/scalapb/ScalaPB/issues/247","id":210434484,"number":247,"title":"Akka HTTP support","user":{"login":"bthuillier","id":482256,"avatar_url":"https://avatars1.githubusercontent.com/u/482256?v=3","gravatar_id":"","url":"https://api.github.com/users/bthuillier","html_url":"https://github.com/bthuillier","followers_url":"https://api.github.com/users/bthuillier/followers","following_url":"https://api.github.com/users/bthuillier/following{/other_user}","gists_url":"https://api.github.com/users/bthuillier/gists{/gist_id}","starred_url":"https://api.github.com/users/bthuillier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bthuillier/subscriptions","organizations_url":"https://api.github.com/users/bthuillier/orgs","repos_url":"https://api.github.com/users/bthuillier/repos","events_url":"https://api.github.com/users/bthuillier/events{/privacy}","received_events_url":"https://api.github.com/users/bthuillier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-27T09:49:57Z","updated_at":"2017-05-31T21:25:33Z","closed_at":null,"body":"I currently using akka http with protobuf, I think it can be cool to add the support for everyone, I don't know where to put the code, if I have to create a specific project or it can be integrated here. The first version of the code is : \r\n```scala\r\nimport akka.http.scaladsl.marshalling.{PredefinedToEntityMarshallers, ToEntityMarshaller}\r\nimport akka.http.scaladsl.unmarshalling.{FromEntityUnmarshaller, Unmarshaller}\r\nimport com.trueaccord.scalapb.{GeneratedMessage, GeneratedMessageCompanion, Message}\r\n\r\n\r\ntrait ProtobufSupport {\r\n  implicit def protobufMarshaller[T <: GeneratedMessage]: ToEntityMarshaller[T]  = PredefinedToEntityMarshallers.ByteArrayMarshaller.compose[T](r => r.toByteArray)\r\n  implicit def protobufUnmarshaller[T <: GeneratedMessage with Message[T]](implicit companion: GeneratedMessageCompanion[T]): FromEntityUnmarshaller[T] =\r\n    Unmarshaller.byteArrayUnmarshaller.map[T](bytes => companion.parseFrom(bytes))\r\n}\r\n```\r\n\r\nI will open a PR when I have more information where to put it\r\n"},"comment":{"url":"https://api.github.com/repos/scalapb/ScalaPB/issues/comments/305322293","html_url":"https://github.com/scalapb/ScalaPB/issues/247#issuecomment-305322293","issue_url":"https://api.github.com/repos/scalapb/ScalaPB/issues/247","id":305322293,"user":{"login":"akauppi","id":1297734,"avatar_url":"https://avatars3.githubusercontent.com/u/1297734?v=3","gravatar_id":"","url":"https://api.github.com/users/akauppi","html_url":"https://github.com/akauppi","followers_url":"https://api.github.com/users/akauppi/followers","following_url":"https://api.github.com/users/akauppi/following{/other_user}","gists_url":"https://api.github.com/users/akauppi/gists{/gist_id}","starred_url":"https://api.github.com/users/akauppi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akauppi/subscriptions","organizations_url":"https://api.github.com/users/akauppi/orgs","repos_url":"https://api.github.com/users/akauppi/repos","events_url":"https://api.github.com/users/akauppi/events{/privacy}","received_events_url":"https://api.github.com/users/akauppi/received_events","type":"User","site_admin":false},"created_at":"2017-05-31T21:25:33Z","updated_at":"2017-05-31T21:25:33Z","body":"@bthuillier While this is cool, and getting Akka-http marshallers right often takes a bit more time than one would want, is adding this to ScalaPB itself the right choice?\r\n\r\nJust having a StackOverflow entry might suffice? If you go that route, tag it both `akka-http` and `scalapb`."}}
{"actor":{"display_login":"akauppi"}}