Giter Club home page Giter Club logo

jsonrpc's People

Contributors

johnstevenson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

jsonrpc's Issues

Getting Warning.

Hello,

I have latest code and php5.3-unbuntu.

Warning: date(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Calcutta' for 'IST/5.0/no DST' instead in /var/www/jsonrpc/example/client.php on line 41 Call Stack: 0.0001 328420 1. {main}() /var/www/jsonrpc/example/client.php:0 0.0113 369792 2. date() /var/www/jsonrpc/example/client.php:41

I have set at top date_default_timezone_set('America/Los_Angeles');

I getting this and script not works.

Thanks,
Tejas Tank.
[email protected]

Optionals parameters shifted if missing in request

Parameters are ordered by name, but optional parameters not present in request are not handled and the parameters are shifted.

With the function :

updateUser($password = null, $email = null, $receiveEmail = null)

request :

"params":{"receiveEmail":false, "email":"[email protected]"}

bad call :

updateUser("[email protected]", false)

The server ordered well the parameters, but miss the first optional one and call the function with the list receive.

Anyway, thanks for this great bundle,
Vincent.

To configure for object to array.

Hello,

From web client I had make request, but server understand array as object.

How can I set json_decode($string, true);

My Client request .
$.jsonrpc({
method : 'finalprice',
params : {mod:'invoice',ids:[1], vals:{'name':"tejas tank"}},
debug : true
}, {
success : function(result) {
console.log(result,"d");
},
error : function(error) {
console.log(error,"error");
},
});

Here, Json server understand {'name':"tejas tank"} as an object instead of array.

I getting error log, PHP Warning: Invalid argument supplied for foreach() in /var/www/tejas.php on line 2165

Because of I pass {'name':"tejas tank"} and it should be understand as array.

Please let me know your response soon.

Thanks,
tejas tank.
gtalk : [email protected]

How can I access it from javascript calls

Does any jasonrpc.js support for your jsonserver ?

Can you add some flexible and easy examples.

Examples with different kind of data from server to client and client to server.

Example hold int, float, Date, array, char, text. in call and response.

I have faced many time date related issues in rpc server and clients.

I want to use this with my application.

If you provide soon examples then I will be really thankful of you.

Thanks,
Tejas

why not use curl

I would like to ask why you want to use file_get_content this inefficient way, instead of using curl

variadic params for method

If we have a lot of parameters and want to validate them via some framework validators, it could be useful to let users to pass params to method as a variadic param. e.g.

public function methodName(...$params)
{
    // some validations here
}

Missing member: jsonrpc

Seems like there is an issue with the response class, all my calls show this error: Invalid Response (0): Missing member: jsonrpc.

Made some test and it seems to come from Response class that thinks it is an old Response, if I change the following code in Client class:

  if (!$res = $response->create($json_array))
  {
    $this->setError($response->fault);
  }

To this:

  if (!$res = $response->create((array)$json_array))
  {
    $this->setError($response->fault);
  }

It works fine, here is my raw response:
{"result":{"transactions":[],"lastblock":"673e1f84afefafea446f2dd9c942ac7f387f5f46089933829fbf759652e95e69"},"error":null,"id":1}

Korri

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.