detailed error message when using JsonStringToMessage

49 views
Skip to first unread message

Shuo Yang

unread,
May 19, 2020, 7:20:20 PM5/19/20
to Protocol Buffers
Hi, I want to know if it is possible to get a more detailed error message when converting a JSON string to a protobuf. 
For example, if field foobar in the JSON is not defined in protobuf, I want the error_message() tell me that "field foobar is not defined".
However, I did some experiments and find that it can only tell me "canon find field", which is not very useful, as it's not telling me which field cannot be found.

Is there a way to get that detailed error message?
Thank you.

Shuo Yang

unread,
May 24, 2020, 1:11:48 AM5/24/20
to Protocol Buffers
any thoughts?
Reply all
Reply to author
Forward
0 new messages