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
So I have a serde_json::Value and I want to convert it into a pbjson_types::Value. I need this because my proto file defines a field with the type google.protobuf.Value. I've looked through the source quite a bit and I'm really not sure how to do this. It seems like you can only build pbjson_types::Value from either primitive types, other pbjson_types, or a serde serializer.
My assumption was I'd be able to call something like pbjson_types::Value::from(my_value) and it'd just work if my_value implements serde Serialize, but that doesn't seem to be the case. So I've tried to convert it to serde_json::Value myself first, but there is still no way to convert from that to pbjson_types::Value.
I've read the other issues and some tests in the code but can't figure it out. So any help would be much appreciated.
The text was updated successfully, but these errors were encountered:
So I have a
serde_json::Value
and I want to convert it into apbjson_types::Value
. I need this because my proto file defines a field with the typegoogle.protobuf.Value
. I've looked through the source quite a bit and I'm really not sure how to do this. It seems like you can only buildpbjson_types::Value
from either primitive types, otherpbjson_types
, or a serde serializer.My assumption was I'd be able to call something like
pbjson_types::Value::from(my_value)
and it'd just work ifmy_value
implements serde Serialize, but that doesn't seem to be the case. So I've tried to convert it toserde_json::Value
myself first, but there is still no way to convert from that topbjson_types::Value
.I've read the other issues and some tests in the code but can't figure it out. So any help would be much appreciated.
The text was updated successfully, but these errors were encountered: