-
Notifications
You must be signed in to change notification settings - Fork 53
Description
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.