Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

We do, it's called JSON-RPC.


Whoa, completely missed that boat.

Is it in active use? Wikipedia page says last spec update was in 2010. No other details online. I could not find any specific implementations.


Active use is really irrelevant if you only plan on using it inside a company, because you can implement a client and server within 30 mins to an hour, no external tools needed. The spec is clear and readable. It's excellent. We use it with a TypeScript codebase and just share the interfaces for the services in a monorepo. The spec is so simple it doesn't really need an update.

If you want a more advanced implementation with type inference for Typescript you can use this: https://github.com/shekohex/jsonrpc-ts

I'd still recommend implementing your own, my own implementation is based off the one above.

The only caveat compared to GRPC is you lose out on field validation due to it not being protobuf/and the obvious json decode overhead

Edit: if you want to know some current users of it, I believe the Ethereum protocol uses it heavily


Arista Networking uses it in their eAPI protocol. It let's you have machine parsable outputs and avoid ye olde days of screen scraping network device outputs to view interface status and other details.

I believe most users make use of it via an open source json-rpc python lib. You can find a few examples online if you'd like to know more.


It's used at least as the foundation of the LSP protocol. So basically, it's deployed daily in millions of editors.


Arguably, the vast majority of REST APIs are "JSON RPC" with a more convoluted calling convention based on URLs, HTTP verbs and status codes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: