Re: [protobuf] BinaryToJsonString mishandling strings containing UTF8 multibyte characters

2016-04-10 Thread Ron Ben-Yosef
type_url should be an identifier of the type of the protobuf message you're transcoding. By default the url of a specific message type looks like *type.googleapis.com/.. *I'd imagine the prefix might be configurable to something other than *type.googleapis.com*, but can't say for sure, haven't

Re: [protobuf] BinaryToJsonString mishandling strings containing UTF8 multibyte characters

2016-04-05 Thread Zachary Deretsky
Ron, could you post and example and some explanation on how to (de)serialize proto3 to JSON using LIBPROTOBUF_EXPORT util::Status BinaryToJsonString( TypeResolver* resolver, const string& type_url, const string& binary_input, string* json_output, const JsonOptions& options);

Re: [protobuf] BinaryToJsonString mishandling strings containing UTF8 multibyte characters

2015-11-26 Thread Ron
On Wednesday, November 25, 2015 at 8:56:51 PM UTC+2, Feng Xiao wrote: > > Thanks for the explanation. Could you help file a bug for this on protobuf > github site? If you know of an solution to this, you are also welcomed to > send us a pull request. > Sure, no problem.

Re: [protobuf] BinaryToJsonString mishandling strings containing UTF8 multibyte characters

2015-11-25 Thread Ron
Sure. For example, I defined the below message in the proto file: message Person { string first_name = 1; string last_name = 2; } When I set the first_name field to "Ron" both binary serialization and JSON serialization work fine. But when I set it to "רון" (as UTF8) , while the

Re: [protobuf] BinaryToJsonString mishandling strings containing UTF8 multibyte characters

2015-11-24 Thread 'Feng Xiao' via Protocol Buffers
On Tue, Nov 24, 2015 at 11:42 AM, Ron wrote: > Hi, > > When using *BinaryToJsonString *or *BinaryToJsonStream*, I seem to > encounter a problem whenever there's a message containing a string > containing multibyte characters. > After some debugging, it seems the place