First of, thank you for your work on pbjson. It saves a lot of handcrafted serde fine tuning. Especially the fact that pbjson can deserialize enums either from their value or from their name, super handy.
One last thing I wonder about pbjson: it seems that the only way to deserialize a Protobuf bytes (i.e. a Vec<u8>) is to have it expressed as a base64 string, like "data": "AAAH4AEM",. If I do submit the following "data": "[ 0, 0, 7, 224, 1, 12 ]",, it returns an error because it expects a base64 string.
I know the official Protobuf's recommendation for JSON mapping does recommend using base64 strings for bytes. I just wonder if it would be possible to also support deserialization of bytes from a JSON int array? Similarly to what is recommended for repeated.
Hello,
First of, thank you for your work on pbjson. It saves a lot of handcrafted serde fine tuning. Especially the fact that pbjson can deserialize enums either from their value or from their name, super handy.
One last thing I wonder about pbjson: it seems that the only way to deserialize a Protobuf
bytes
(i.e. aVec<u8>
) is to have it expressed as a base64 string, like"data": "AAAH4AEM",
. If I do submit the following"data": "[ 0, 0, 7, 224, 1, 12 ]",
, it returns an error because it expects a base64 string.I know the official Protobuf's recommendation for JSON mapping does recommend using base64 strings for
bytes
. I just wonder if it would be possible to also support deserialization ofbytes
from a JSON int array? Similarly to what is recommended forrepeated
.Regards
AL