JSON-RPC Library |
[eluser]debonair[/eluser]
Hi Nick, I am also interested in the Libray and the documentation, can't seem to get it right, please post some sample server and client code.
[eluser]alexanderweiss[/eluser]
Great library! For the people asking for more documentation/example code. It works fine for me in this way: Code: <?php I then do a JSON-RPC request like the following: Code: {"method":"contentList","params":null,"id":"gj5rqzrz"} Or: Code: {"method":"updateContentListOrder","params":[{"id":"2","groupID":false},{"id":"7","groupID":"2"},{"id":"6","groupID":"2"},{"id":"5","groupID":"2"},{"id":"1","groupID":false},{"id":"8","groupID":"1"},{"id":"2","groupID":"1"},{"id":"4","groupID":"1"},{"id":"1","groupID":"1"}],"id":"gj5rxe12"} In the first method my model simply returns an array containing object (result of a MySQL query). For the second method the model takes an array of objects (as seen in the call) and returns true or false. That's all there's to it. I hope it helps.
[eluser]petroz[/eluser]
[quote author="Nick Husher" date="1228517712"]After a little poking around, I realized that there's no JSON-RPC library for CodeIgniter. In fact, the state of JSON-RPC libraries for PHP is pretty sad. I decided to rectify that for CI, at least, by writing my own JSON-RPC server/client. It behaves similarly to CI's XML-RPC library, so it should be easy to set up if you're familiar with it. The server mostly adheres to the JSON-RPC 1.1 working draft while the client can be used to request JSON data from any source. CI JSON-RPC 1.0 Readme follows below:[/quote] The link is dead... ![]()
[eluser]xoRiZ[/eluser]
[quote author="petroz" date="1299220823"][quote author="Nick Husher" date="1228517712"]After a little poking around, I realized that there's no JSON-RPC library for CodeIgniter. In fact, the state of JSON-RPC libraries for PHP is pretty sad. I decided to rectify that for CI, at least, by writing my own JSON-RPC server/client. It behaves similarly to CI's XML-RPC library, so it should be easy to set up if you're familiar with it. The server mostly adheres to the JSON-RPC 1.1 working draft while the client can be used to request JSON data from any source. CI JSON-RPC 1.0 Readme follows below:[/quote] The link is dead... ![]() If someone has this library; please archive and reply. I would like to update and host. Thanks!
[eluser]xoRiZ[/eluser]
[quote author="l3to" date="1306432636"]There you go ![]() http://nickol.us/code/ and as attach[/quote] Thank you.
[eluser]dUspan[/eluser]
hi im still confused with this library. can you pls make a complete basic code using this library and zip or post it here?i really want to learn this library ![]() much better if you insert an sql query to json format. thanks
[eluser]searain[/eluser]
Thanks! This library works. How about codeigniter 2? Does it have built in json rpc library? or is there a 3rd party json rpc library for CI2? |
Welcome Guest, Not a member yet? Register Sign In |