I can vouch for grpc-gateway being a solid solution for JSON-based access. I hope this functionality gets rolled into grpc-web.
If you want bidi streaming support for JSON you can add https://github.com/tmc/grpc-websocket-proxy. IDT grpc-gateway supports fetch-based streaming currently, but it likely will as soon as browsers do. Long term, I really hope grpc-web grows JSON support. On Fri, Dec 29, 2017 at 10:55 AM, Johan Brandhorst < johan.brandho...@gmail.com> wrote: > This could be nice. >> >> But if we get addicted to this, does it also speak JSON for people who >> want to speak JSON? I'm afraid we'd either let our JSON rot, or we'd have >> twice the maintenance cost. Ideally we'd get both for free, with one >> sufficiently-annotated proto file. >> > > While the gRPC-Web spec > <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md#protocol-differences-vs-grpc-over-http2>mentions > JSON content types, I don't think this is currently possible in the > gRPC-Web client. However, we could deploy a gRPC-gateway > <https://github.com/grpc-ecosystem/grpc-gateway/> on a handler and split > traffic based on headers and HTTP version. The gRPC-gateway uses the Google > annotations.proto annotations to map gRPC service methods to endpoints. > So we could bake in a gRPC-gateway and a gRPC server and expose both JSON > and gRPC and gRPC-web on the same port, with the interfaces all using the > same protofile as the source of truth. > > I could potentially bake this part into the current POC if it would be of > interest. > > Johan > > -- > You received this message because you are subscribed to the Google Groups > "Camlistore" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to camlistore+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- best, Eric eric.pdxhub.org <http://pdxhub.org/people/eric> -- You received this message because you are subscribed to the Google Groups "Camlistore" group. To unsubscribe from this group and stop receiving emails from it, send an email to camlistore+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.