How to transform Google protobuf message into JSON

85 views Asked by At

when I try to use Google.Protobuf.JsonFormatter and call formatter.Format(response) I receive en error with message: System.InvalidOperationException: 'Value message must contain a value for the oneof.'

var formatter = new JsonFormatter(JsonFormatter.Settings.Default);
string json = formatter.Format(response);

How can I format a protobuf object into json?

I was expecting to receive JSON from the protobuf object

0

There are 0 answers