Re: [protobuf] Embedding arbitrary JSON in a message

2018-09-26 Thread Josh Humphries
If you are using JavaScript, there may not be a good solution. Ironically, the JavaScript implementation of protos does not support the canonical JSON representation for protobuf types (which would be needed to convert arbitrary JSON into a google.protobuf.Value). Most other languages, though,

Re: [protobuf] Embedding arbitrary JSON in a message

2018-09-26 Thread Jimit Modi
Hello @Siddharth, @John, Did you guys found any solution around it. We are also stuck at very same thing. On Friday, August 17, 2018 at 3:36:29 PM UTC+5:30, Siddharth Kherada wrote: > > Can I please get an example of how to do this is any language with proto > file? > > I desperately need help

Re: [protobuf] Embedding arbitrary JSON in a message

2018-08-17 Thread Siddharth Kherada
Can I please get an example of how to do this is any language with proto file? I desperately need help with this. I am stuck for a week now on this issue. Thanks, Sid On Thursday, 21 June 2018 15:32:46 UTC-4, Josh Humphries wrote: > > Oops, I meant to point you to google.protobuf.Value: >

Re: [protobuf] Embedding arbitrary JSON in a message

2018-06-21 Thread Josh Humphries
Oops, I meant to point you to google.protobuf.Value: https:/ /github.com/google/protobuf/blob/master/src/google/protobuf/struct.proto#L63 It can represent *any* kind of JSON value. The Struct type is what is used to represent JSON *objects* (there is also ListValue, for arrays, as well as support

[protobuf] Embedding arbitrary JSON in a message

2018-06-21 Thread John Lilley
Disclaimer: I am totally new to protobuf, engaged in an exploratory POC. Please forgive dumb questions :-) We are looking at migrating an existing, JSON-based protocol in which hand-coded C++ is written to perform serdes between objects and JSON. We want to replace the hand-coding with an