[protobuf] Re: Override Default value for String variables

2019-06-25 Thread 'Hao Nguyen' via Protocol Buffers
In many of our supported languages, you can find an option in the JsonFormat printer to include the default value. e.g., https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/JsonFormat.Printer#includingDefaultValueFields-- https://developers.google.com/protoc

[protobuf] Re: The "Any" type is not very well documented in the Python documentation

2019-06-25 Thread 'Hao Nguyen' via Protocol Buffers
Any is a special type that contains a string type_url field and a bytes value field. However, you normally shouldn't touch those fields directly, but instead you should use Pack, Unpack and Is methods for your Any type. Those fields represent how the data is transferred over the wire, but not n

[protobuf] Re: MessageDifferencer

2019-06-25 Thread 'Hao Nguyen' via Protocol Buffers
You can take a look at the Truth proto test: https://github.com/google/truth/blob/master/extensions/proto/src/test/java/com/google/common/truth/extensions/proto/ProtoSubjectTest.java Basically you would need to call something like: com.google.common.truth.extensions.proto.ProtoTruth.assertThat(me

Re: [protobuf] Decoding and making sense of MessageDifferencer output from Google Protobuf APIs

2019-05-28 Thread 'Hao Nguyen' via Protocol Buffers
MessageDifferencer can be quite useful in tests. If you are comparing an actual proto against an expected proto and they don't match, then MessageDifferencer can tell you the delta in the test output. On Tue, May 28, 2019 at 10:08 AM 'Adam Cozzette' via Protocol Buffers < protobuf@googlegroups.co

Re: [protobuf] Re: How to read continuous stream of messages from TCP

2019-05-09 Thread &#x27;Hao Nguyen&#x27; via Protocol Buffers
Have you tried using https://grpc.io/? Streaming is supported there: https://grpc.io/docs/guides/concepts/ *From: * *Date: *Mon, May 6, 2019 at 8:27 PM *To: *Protocol Buffers Hi, > > > this problem can be solved in below way also. > > 1. By defining new message type. > > new_message { > messa

Re: [protobuf] C++ MOMI Parser in 3.7.0

2019-05-08 Thread &#x27;Hao Nguyen&#x27; via Protocol Buffers
+Gerben Stavenga Can you help document how external users can use the new parser? On Wed, May 8, 2019 at 12:32 PM Benjamin Mahler wrote: > Hi there, > > The release notes for C++ in 3.7.0 mention the introduction of a "new MOMI > (maybe-outside-memory-interval) parser". > > https://github.com/p

Re: [protobuf] Parse *.pb file to get VTA Instruction set architecture

2019-05-03 Thread &#x27;Hao Nguyen&#x27; via Protocol Buffers
You may want to contact docs.tvm.ai maintainers for helps. It is not clear how it is related to Protobuf. On Thu, May 2, 2019 at 5:34 PM Priya Arora wrote: > Howdy! > > I am in need of generating VTA ISA ( > https://docs.tvm.ai/vta/tutorials/matrix_multiply.html) from *.pb file. > Can anyone ple

Re: [protobuf] jspb get unset message returns undefined (but JSDoc says null)

2019-05-02 Thread &#x27;Hao Nguyen&#x27; via Protocol Buffers
+Bo Yang what should be the right behavior? On Thu, May 2, 2019 at 9:37 AM Hochhaus, Andy wrote: > Hello, > > We are converting our JS code from closure-library `goog.proto2` protocol > buffers to jspb. During our conversion we realized that unset singular > message fields return undefined. Th