-
Hi,
I have a proxy which needs to decode a message, get the key, some metadata and encode it again. Message is then routed to the actual receiver and fully decoded. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It seems like there some potentially interesting things we could do here. So to review what is possible right now: you can certainly encode a CBOR object to a byte array/buffer and then encode that into a parent object:
However, we can certainly imagine some improvements on this. In this scheme, the nested
And additionally you may want to set this up in a way that a Furthermore, is the question of whether it might be helpful for such proxy-style handling of embedded CBOR data to be actually included in cbor-x itself (so you don't have to write the extensions). And this would also raise a question of the most appropriate/interoperable way of encoding such a thing. This could be encoded with a self-describing CBOR tag (tag 55800) within the byte array, where the contents could be auto-detected. Or that tag or another tag could be around the byte array as indicator of the contents without sniffing in the byte array itself. Anyway, let me know if you have any thoughts on that, it might be interesting to build in some support for this. |
Beta Was this translation helpful? Give feedback.
It seems like there some potentially interesting things we could do here.
So to review what is possible right now: you can certainly encode a CBOR object to a byte array/buffer and then encode that into a parent object: