5 ms·
JSON RPC is looking for a new maintainer
- benatkin 17y agoI'm interested to see what someone could do with this, if they pushed the idea a little harder. I'm also just curious what people who've used JSON for REST services a lot think of this. Is it just a fancy way of describing what people are already doing with JSON? Or is there real value in this standard for making communication with JSON over a network easier?
- tlrobinson 17y agoIs json-rpc considered RESTful? At first glance it seems like no, since it encodes the method within the request body instead of using HTTP methods.
- sh1mmer 17y agoAnything that includes the three letters "RPC" is not inherently not RESTful. This is because you are making Calls to Remote Procedures rather than Transferring States of REpresentations [of resources]. I, of course, rearranged the acronyms RPC and REST for the sake of English.
- tlrobinson 17y agoRandom question, which isn't clear from the spec: can arguments be arbitrarily "deep" JSON objects (i.e. arrays and objects) or are they limited to primitives (strings, numbers, booleans, null)? (obviously you could just pass a JSON serialized string, but that's not what I'm asking)
- benatkin 17y agoThey can be arbitrarily deep. Otherwise they couldn't claim to be supporting JSON objects as parameters. Of course, anyone could just do a REST request using a wrapper object with the name of the procedure and an id. Then you'd have implemented a JSON-based RPC mechanism yourself! So it's pretty trivial. This mainly exists to get the idea out and implementations in various scripting languages, methinks. One thing that might be cool: Perhaps an URL could map to an object, and making an rpc call on that URL could call a function on that object.
- tlrobinson 17y ago"Perhaps an URL could map to an object, and making an rpc call on that URL could call a function on that object." That seems to be what this article is advocating: http://www.sitepen.com/blog/2009/01/29/some-rpc-with-your-jsonreststore/ http://www.sitepen.com/blog/2009/01/29/some-rpc-with-your-js...