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 your feature request related to a problem? Please describe.
When using trubka consume proto if you have a protobuf with a field of type bytes, the field will be formatted as base64, but I would like to look at them in hex string format. There is an option to format your entire message as hex using -F hex but not just bytes fields.
Describe the solution you'd like
An option to output in -F json-indent format, but with individual fields of type bytes as hex strings.
For example adding a flag --bytes-format [base64|hex].
You could take this concept even further and have custom formatting for any type with some kind of configuration file. For example you may want timestamps in a different format as well.
The text was updated successfully, but these errors were encountered:
Related: in the producer it would be good to have support for providing hex strings for bytes fields in the json template created by trubka produce schema -g. For example, if I want a mac address as bytes (6 bytes without delimiters) then I would like to have a 12-long hex string like Hex(????????????). But right now I have to think about how many base64 bytes and do B64(????????). This will also only work if the number of bytes is divisible by 3, otherwise there's no way to accurate generate what I need.
Is your feature request related to a problem? Please describe.
When using
trubka consume proto
if you have a protobuf with a field of typebytes
, the field will be formatted as base64, but I would like to look at them in hex string format. There is an option to format your entire message as hex using-F hex
but not just bytes fields.Describe the solution you'd like
An option to output in
-F json-indent
format, but with individual fields of typebytes
as hex strings.For example adding a flag
--bytes-format [base64|hex]
.You could take this concept even further and have custom formatting for any type with some kind of configuration file. For example you may want timestamps in a different format as well.
The text was updated successfully, but these errors were encountered: