Topic: json rpc weirdness


first of all congratulations to this nice project! I'm currently implementing a more complex uploader in django and I enjoy using plupload very much.

some critisim though: the server "part" of plupload (how to handle chunked files etc) is quite poorly documented. It took me a while to figure out that plupload uses the not so common json-rpc standard to communicate with the server.

The json-rpc weirdness in upload.php confuses me even more: The Spec says that the result of the response mustn't be null in case of a successful request, but upload.php responds this way: … d.php#L101

And what does  {..."id" : "id"} mean in the same line? shouldn't the id in the response match the one of the request?

Please improve the docs for the server part.... maybe Jumploader's docs can serve as an example:


Re: json rpc weirdness

The JSON rpc output is just an example output. Plupload doesn't use it at all in fact it doesn't handle server error responses on purpose. Since the users backend can be anything and we don't want to tie them to that.

We will improve the docs in the future, use some kinds of Wiki instead of just one page. But I think that an example says more than thousand words so we might instead before adding the wiki have some more examples for Python, Ruby, C# etc.

But on the JSON-RPC side, this is a very powerful spec and it's a shame people doesn't user or understand it. Having a "soap" like JSON based method of calling things on the server is very userful.