i'm trying to encode protobuf object (prepared by scalapb) and pass it to another service written in python (I think, it's doesn't matter, but I'm using NATS.io as messaging system).
val protoMsg: ProtoMessage = ProtoMessage(foo = "21266894", bar = 155)
conn.publish("my.topic", protoMsg.toByteArray)
Python protobuf deserializer can't deserialize this message, I think, that's expecting something like a hex string \xc0\xa9\xb6\xe3
, but it receives something like [B@7d958728
instead.
What i'm doing wrong? How I can get a necessary representation of a bytearray?