JSON-RPC is it like REST Servive? I am new to JSON-RPC and need help to understand!

344 views
Skip to first unread message

Prasanna Kumar Nayak

unread,
Feb 21, 2016, 8:08:27 AM2/21/16
to JSON-RPC
I have the endpoint url like "http://gurujsonrpc.appspot.com/guru"
and request json as

{
"jsonrpc": "2.0", 
"method": "ab56", 
"id": "437",
"params": ["en","12347","test3","748758jdh","501"]
}

Need to hit the service with above json, but not able to understand the how to pass this value

option 1 is it like http://gurujsonrpc.appspot.com?jsonrpc=2.0&method=ab56&id=437&params=["en","12347","test3","748758jdh","501"] to hit the service to get the response.
option 2 passing the whole json to endpoint url. Here which parameter we need to append the json?

Anybody have any idea please reply ASAP.

!Thanks

Skylos

unread,
Feb 21, 2016, 3:29:29 PM2/21/16
to Json Rpc

It is an Rpc or remote procedure call specification. The standard defines how such a call works but not the establishment of the channel on which it runs. You must consult the documentation of the provider of the service to determine what the details are regarding what form this takes.

It is not unusual to place the service behind a url which is accessed through HTTP via a POST command. The body of the request and reply can conform to the json-rpc specification.

That said you can also establish connection through many of the forms of communication with various wrappers or lack thereof as the case may be.

As an analogy, knowing the data format used for a telephone call neither informs you as to how to dial a phone call nor the electrical characteristic details of the wires between endpoints. Similarly json-rpc only speaks of the communication format over a channel not how That communication channel may be established.

David

--
You received this message because you are subscribed to the Google Groups "JSON-RPC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to json-rpc+u...@googlegroups.com.
To post to this group, send email to json...@googlegroups.com.
Visit this group at https://groups.google.com/group/json-rpc.
For more options, visit https://groups.google.com/d/optout.

Shane Green

unread,
Feb 21, 2016, 8:31:43 PM2/21/16
to json...@googlegroups.com
What David said. I was just going to add that using GET to perform RPC is generally frowned upon because invoked methods aren’t guaranteed to be idempotent. It’s fairly unlikely a 3rd party JSON-RPC service will support GET.



Shane
Reply all
Reply to author
Forward
0 new messages