Jie Luo
Jie Luo
I've put the following APIs ``` def serialize_length_prefixed(message, output) -> None def parse_lengh_prefixed(message, input_bytes) -> message ``` into one of our projects' design doc. Will add the support once the...
MessageToJsonString is calling another function FieldMaskUtil::ToJsonString: https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/util/internal/protostream_objectsource.cc#L700
The error produced in descriptor.cc should also call AddError()/AddWarning() in CommandLineInterface: https://github.com/protocolbuffers/protobuf/blob/d0f91c863ae0fbb75b41460c8bbb786ade197a0f/src/google/protobuf/compiler/command_line_interface.cc#L289
Update: A change has been submitted in internal which can add location error info for import errors (including the two examples above). Expect to see the fix in future release....
Update: location info are added for all errors in descriptor.cc. Will be included in future release.
for MSVS format, feel free to create a PR and assign to us. Related code: https://github.com/protocolbuffers/protobuf/blob/2350e20cae1a9a1f54147c6e18e1a0da706cca96/src/google/protobuf/compiler/command_line_interface.cc#L346
Tried to reproduce but there's no segfault C++ extension I got: ``` in testPythonicInit foo = test_proto3_optional_pb2.Foo(b=bar2) TypeError: Parameter to MergeFrom() must be instance of same class: expected google.protobuf.python.internal.Bar got...
We could add an option is json fotmat setting and a method public Settings WithPreserveFieldName(bool perserveFieldName) => new Settings(formatDefaultValues, TypeRegistry, FormatEnumsAsIntegers, perserveFieldName) https://github.com/protocolbuffers/protobuf/blob/master/csharp/src/Google.Protobuf/JsonFormatter.cs#L781 Are you happy to create a PR...
ToJsonName() is called in some helper APIs or generated code. Users can create their own JsonFormatter() with settings and then call formatter.Format(message). For example: https://github.com/protocolbuffers/protobuf/blob/master/csharp/src/Google.Protobuf.Test/JsonFormatterTest.cs#L90
What types-protobuf package do you mean? Have you tried to use protoc generate python stubs (.pyi) with --pyi_out