On Tue, Oct 10, 2017 at 8:15 PM, Qian Zhang wrote:
> Note that you can use the always_print_enums_as_ints option to work around
>> this problem:
>
> https://github.com/google/protobuf/blob/master/src/
>> google/protobuf/util/json_util.h#L73
>>
>
>
> With this option enum
Feng, any comments? :-)
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to
>
> Note that you can use the always_print_enums_as_ints option to work around
> this problem:
https://github.com/google/protobuf/blob/master/src/google/protobuf/util/json_util.h#L73
>
With this option enum value will printed as integers and will be accepted
> by JsonStringToMessage.
Note that you can use the always_print_enums_as_ints option to work around
this problem:
https://github.com/google/protobuf/blob/master/src/google/protobuf/util/json_util.h#L73
With this option enum value will printed as integers and will be accepted
by JsonStringToMessage.
On Tue, Oct 10, 2017
On Tue, Oct 10, 2017 at 12:29 AM, Qian Zhang wrote:
> Hi,
>
> I am using protobuf-3.3.0, and I found when parsing an unrecognized enum
> value for an optional enum field, the behaviors of "ParseFromString()" and
> "JsonStringToMessage()" are different. "ParseFromString()"
Hi,
I am using protobuf-3.3.0, and I found when parsing an unrecognized enum
value for an optional enum field, the behaviors of "ParseFromString()" and
"JsonStringToMessage()" are different. "ParseFromString()" will succeed and
the field's getter method will return the default enum value, but