NOTE: This article is 3 years or older so its information may no longer be relevant. Read on at your own discretion! Comments for this article have automatically been locked, refer to the FAQ
for more details.
I've been using JSON-RPC quite a bit lately and I wanted to have a way of calling my service without writing any special proxy code or using additional libraries, so I've put together a GAE App that uses Twitter Bootstrap for the UI and the json2.js to parse the JSON that's received using the XMLHttpRequest object. It was so quick and easy and the results look quite good.
The whole interface consists of two sections:
- Request input
- Response output
The request portion requires the URL of the service and a JSON string for the JSON-RPC call. The response section shows the raw JSON-RPC response as well as breaking it down per object.
The JSON for both the response and request are parsed using json2.js, which attempts to use the built-in JSON object in the browser first, if that fails it uses the eval() method with some checks to make sure the JSON doesn't include any malicious code.
This is what the request part looks like:
This is the response part:
The app is free to use and is available here: http://gurujsonrpc.appspot.com
Hope you found this post useful...
...so please read on! I love writing articles that provide beneficial information,
tips and examples to my readers. All information on my blog is provided free of
charge and I encourage you to share it as you wish. There is a small favour I ask in return however -
engage in comments below, provide feedback, and if you see mistakes let me know.
If you want to show additional support and help me pay for web hosting and
domain name registration,
donations, no matter how small, are always welcome!
Use of any information contained in this blog post/article is subject to this disclaimer
Other posts you may like...