You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an idiomatic way in ScalaBuff for deserializing a union-type container? This would obviate the need for protocol buffer reflection via getAllFields with Java-generated classes. For example, using OneMessage from the protocol buffer documentation :
//not using ScalaBuffOneMessage.parseFrom(msg).getAllFields.values.asScala.foreach { m =>
//do something with Foo, Bar, or Baz, e.g. post to Guava EventBusbus.post(m) //m is an AnyRef but EventBus dispatches to correct subscriber
}
The text was updated successfully, but these errors were encountered:
You can propose a solution that doesn't impact the generated code size too much and if it sounds good, I'll implement it.
I'm not sure but I think you can maybe use the Shapeless library to treat case classes as functional constructs. Maybe some sort of direct support for Shapeless could be added as well.
Is there an idiomatic way in ScalaBuff for deserializing a union-type container? This would obviate the need for protocol buffer reflection via
getAllFields
with Java-generated classes. For example, using OneMessage from the protocol buffer documentation :The text was updated successfully, but these errors were encountered: