问题
I am using jquery to send json rpc requests to rempte server. Here is my jquery code:
var jqxhr = $.getJSON("https://91.199.226.106/ssljson.php?callback=?", splited[1], function(data){
alert("aaaaaa");
});
jqxhr.error(function() { alert("error"); })
Where spleted[1]
isthe json string I am sending to server.
I am getting this message from google chrome:
Uncaught SyntaxError: Unexpected token :ssljson.php:1
Error code is :
{"jsonrpc":"2.0","id":null,"error":{"code":-32600,"message":"Invalid JSON-RPC 2.0 request error (-32600)"}}
My json string is:
{"version":"2.0","method":"merchant_check","params":[{"hostID":150999,"orderID":106,"amount":"500","currency":"051","mid":15001038,"tid":15531038,"mtpass":"12345","trxnDetails":""}],"id":106}
What is the issue. Thanks for help.
来源:https://stackoverflow.com/questions/9871972/json-rpc-string