Closed joshuar closed 10 months ago
It would be a very quick addition; feel free to submit a PR (alternatively just converting, []byte(rawMsg)
is pretty much a no-op).
I'm going to close this as no PR was forthcoming and I'm unsure how much benefit this delivers (we could end up supporting all kinds of aliases for []byte
(it's unfortunate that messages are interface{}
but that's not something we can change now).
Hey there,
I've been using
json.RawMessage
in a program, as I have a situation where I need to publish different messages that kinda are the same but might have all different bits in the JSON. Sojson.RawMessage
, which is just a[]byte
anyway, works nicely.It looks like the client code does not recognise a payload that is a
json.RawMessage
, so you get an "unknown payload type" error when using it.Was wondering if there would be a possibility/interest to support
json.RawMessage
as a payload type?