Hi, I have been using this https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/util/Jsonformat. It is working for me to convert grpc messages to json and Jason to grpc message.
Thanks On Sat, 29 Sep 2018, 15:02 omid pourhadi, <[email protected]> wrote: > > > Hi, > > I have a simple proto message in grpc > > message Person{ > int32 id = 1; > string firstName = 2; > } > > How can I convert it into Json after generating code for java language and > convert json to Person? > > for example : > > > Person.toJson(); > > {"id":, "firstName": "test"} > > Or > > Person.fromJson(json); > > let me know if there is any solution rather than > https://grpc.io/blog/grpc-with-json > > Thanks > > -- > You received this message because you are subscribed to the Google Groups " > grpc.io" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/grpc-io. > To view this discussion on the web visit > https://groups.google.com/d/msgid/grpc-io/b8ef7c98-1eb3-4686-9006-8d8e33ef2258%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/b8ef7c98-1eb3-4686-9006-8d8e33ef2258%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAFgyg%3DCRNLt9M6AjXBE_vebOBw0Wxesvwr%3D%3DjfvurZk1pNJxiw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
