--
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+unsubscribe@googlegroups.com.
To post to this group, send email to prot...@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.
To print Any in JSON, you need to provide a TypeRegistry including the descriptor of all types that may be included in the Any field. See an example here:
On Thu, Jan 12, 2017 at 9:01 AM, Michael Lindenmayer <mikeli...@gmail.com> wrote:
I am having some trouble creating a message and printing it to JSON using the any type. Below is the code that is run:Any any = Any.pack(myMessage);String jsonFormat = JsonFormat.printer().print(any);This thrown an exception: Cannot find type for url: type.googleapis.com/org.apache.activemq.recipies.messages.MyMessageI feel like the mistake is simple, but I can't seem to figure it out.Any help would be appreciated!!!Michael
--
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+u...@googlegroups.com.
To print Any in JSON, you need to provide a TypeRegistry including the descriptor of all types that may be included in the Any field. See an example here:
On Thu, Jan 12, 2017 at 9:01 AM, Michael Lindenmayer <mikeli...@gmail.com> wrote:
I am having some trouble creating a message and printing it to JSON using the any type. Below is the code that is run:Any any = Any.pack(myMessage);String jsonFormat = JsonFormat.printer().print(any);This thrown an exception: Cannot find type for url: type.googleapis.com/org.apache.activemq.recipies.messages.MyMessageI feel like the mistake is simple, but I can't seem to figure it out.Any help would be appreciated!!!Michael
--
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 prot...@googlegroups.com.