php,jquery,xml-rpc,json-rpc,limesurvey
The $aResponseData must be the array of answer to set in table, looking at your example, to have the same 3 answer for Q1_1,Q1_2,q1_3, you can use $response_data = array( "527317X1X11" => "3", "527317X1X12" => "2", "527317X1X13" => "3", ); Just test with this first. You can use startdate to...
You CAN have object parameters in 1.0, inside the array, so your first example is correct. The difference is that in 1.0 there must be an array in params (that can contain objects), and in 2.0 params itself can be an object. Correct in both 1.0 and 2.0: params: [{...
javascript,json,angularjs,json-rpc
if you left the code as you had it originally, you can define a service which uses the jsonrpc module: angular.module('myApp'). service('jsonrpcservice', function(jsonrpc) { var service = jsonrpc.newService('svc'); this.get = service.createMethod('getData'); }); ..in your controller somewhere: jsonrpcservice.get({params}).success(function(result){}).error(function(err){}); you can handle the error in the .error() returned by $http...
Ok, after a lot of research it seems I had to make an object of an array of labels. So this is the working solution http://192.168.5.34/jsonrpc?request={"jsonrpc":"2.0","method":"XBMC.GetInfoLabels","params":{"labels": ["Network.IPAddress","Network.MacAddress"] },"id":1} As a result you get the IP and MAC from the XBMC system....
javascript,jquery,callback,json-rpc,chart.js
The request is handled asynchronously, and thus you need to provide a callback, as you're already doing in the 'success', and 'error' blocks. Probably the easiest way is just to provide yet another callback to be called with the result, like so: $.jsonRPC.setup({ endPoint: '/jsonserver.php' }); getMyStuff(function (result) { console.log("here's...
Strictly no, there should be no JSON-RPC response. The Server MUST NOT reply to a Notification, including those that are within a batch request. Notifications are not confirmable by definition, since they do not have a Response object to be returned. As such, the Client would not be aware of...
Please try to use this solution. public async Task<string> SendJSONData3(string urlToCall, string JSONData) { string UserName = "XXXXXXXXX"; string Password = "XXXXXXXXX"; var httpWebRequest = (HttpWebRequest)WebRequest.Create(urlToCall); httpWebRequest.Credentials = new NetworkCredential(UserName, Password); httpWebRequest.ContentType = "text/json"; httpWebRequest.Method = "POST"; using (var streamWriter = new StreamWriter(await httpWebRequest.GetRequestStreamAsync())) { string json = JSONData; streamWriter.Write(json);...
You have a typo for(int j=0; **i**<klArr.length(); j++)
According to the JSON-RPC 2.0 Specification: When a rpc call is made, the Server MUST reply with a Response, except for in the case of Notifications. The Response is expressed as a single JSON Object, ... So its not possible to get a html page from a JSON::RPC Server....
Still not very happy with the fact that the json code provided by kodi is rather useless for the jsonrpc c++ library, but I managed to get it to work, the json file will need this line: {"jsonrpc": "2.0", "method": "Input.ExecuteAction", "params": { "action": "play"}, "id": 1} and then do:...
objective-c,afnetworking,json-rpc
Thank you, this problem solved. Example code : NSMutableURLRequest *requestHTTP = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:my_url] cachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10]; [requestHTTP setHTTPMethod:@"POST"]; [requestHTTP setValue:AUTHORIZATION_VALUE forHTTPHeaderField:@"Authorization"]; [requestHTTP setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; [requestHTTP setHTTPBody:[jsonString dataUsingEncoding:NSUTF8StringEncoding]]; AFHTTPRequestOperation *op =...
If the array is defined in the file but is empty, like: ... "kl":[] ... Then getJSONArray("kl") will return an empty array, but the object is not null. Then, when you do: kl = c.getJSONArray("kl"); if(kl != null){ klassenID[i] = kl.getJSONObject(0).getString("id"); } kl is not null and kl.getJSONObject(0) will throw...
zend-framework,zend-framework2,json-rpc
Turns out you have two choices to do this: 1) Add parameters to an exception: $e = new Exception('I pooped my pants'); $e->color = 'brown'; $->smell = 'bad'; color and smell would then be in the data parameter of the error response. 2) Pass the server (in my code, $jsonRpc)...
windows,windows-8.1,json-rpc,windows-phone-8.1
In the end I used http://jsonrpc2.codeplex.com/ I had to make slight changes to the code, because some of the things weren't working, since it was made for windows phone 7 and not Windows Universal 8.1. However now it works great, without too much work. You can find the windows phone...
You have to json encode the array first $post = json_encode($post); or CURLOPT_POSTFIELDS, json_encode($post) EDIT Try This: <?php $headers = array( 'Content-Type: application/json' ); $url="https://127.0.0.1:9999"; $post = array( "jsonrpc" => "2.0", "method" => "generateAddress", "id" => "1" ); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);...
javascript,jquery,ajax,json,json-rpc
you need to append the key of the json item. $("#mybox").html(json.key); ...
The simplest way would be to make a request to the PHP service with the time of your last read. Then you just query for any tuple (entity) with a last_update time greater than the last request time. This would require both applications to request for changes on an interval...
The documentation of their API reference (the second link) states: For write requests, he data submitted to the media write API should be in JSON format, encoded as a form parameter named "json". The JSON document should include a "method" field and a "params" field, and the examples you publish...
ios,json,debugging,push-notification,json-rpc
The problem is solved. It seems that running curl commands in command prompt on windows has some problems which returns errors such as curl: (3) [globbing] unmatched brace in colum If you are facing the same problem, follow/recheck the following steps: Check whether you installed curl properly on Windows (http://guides.instructure.com/s/2204/m/4214/l/83393-how-do-i-install-and-use-curl-on-a-windows-machine)...
Here is how I did it. I have this broken out into a few files, but you can put all this in your public root directory, something like rpc-service.php: use Zend\ServiceManager\ServiceManager, Zend\Mvc\Service\ServiceManagerConfig; class Bootstrap { /** @var ServiceManager */ private static $serviceManager; private static function _go() { chdir(dirname(__DIR__)); require __DIR__...
You have several problems. The first is that PayerEndpoint is not correctly spelled (note the lower case "p" PlayerEnd-p-oint). The second is that you need firts to create a MediaPipeline before you can create a PlayerEndpoint or any other media element. If you are new to Kurento, my recommendation is...
javascript,jquery,ajax,json,json-rpc
var username = "username"; var currentpass = "currentpass"; var newpass = "newpass"; var UserInfo = new Array(); UserInfo.push(username); UserInfo.push(currentpass); UserInfo.push(newpass); var data = new Object(); data["jsonrpc"] = "2.0"; data["method"] = "changepass"; data["id"] = "1"; data["params"] = UserInfo; console.log(JSON.stringify(data)); Try this where you submit your form data in ajax... If you...
grails,web-applications,json-rpc
I would take a look at some existing JSON-based Grails plugins: https://grails.org/plugins/tag/json You might be able to take one of these and produce your own custom JSON output format - that is valid JSONRPC2. Otherwise, its a matter of simply creating a DTO object (simple Groovy bean with the structure...