rpc client javascript 0.8.0.2

10 views
Skip to first unread message

Steve Freitas

unread,
Feb 2, 2008, 7:28:20 AM2/2/08
to json-x...@googlegroups.com
Hi Weston,

Fantastic work on this. I spent hours tearing my hair out over Mootools'
utterly broken JSON client, and was so relieved to find yours. It works
so much better.

I decided to switch back to XML-RPC, and found that while making a JSON
call without params specified worked great, it didn't work under
XML-RPC. So I added this line to line 274 of the latest version:

if (params == null) params = [];

I've spent about 30 minutes total programming JavaScript, so I'll take
no offense if you fix it up, but I think the change makes the library a
tad more convenient to use.

Also, I noticed that when I returned an array to the client through
JSON, it came through as an Array, but when I returned an array to the
client through XML-RPC, it came through as an Object. Am I doing
something wrong?

Thanks for any help.

Steve

Steve Freitas

unread,
Feb 2, 2008, 7:37:16 AM2/2/08
to json-x...@googlegroups.com
On Sat, 2008-02-02 at 04:28 -0800, Steve Freitas wrote:
> Also, I noticed that when I returned an array to the client through
> JSON, it came through as an Array, but when I returned an array to the
> client through XML-RPC, it came through as an Object. Am I doing
> something wrong?

The answer to that question was yes. My mistake, I figured it out. :-)

Great work! I can tell I'm going to be leaning on this library for
years.

Steve

Weston Ruter

unread,
Feb 5, 2008, 1:23:24 AM2/5/08
to Steve Freitas, json-x...@googlegroups.com
Hi Steve, can you share how you are invoking the XML-RPC service with JavaScript? I'm not sure how the issue is occurring.

Thanks.
Reply all
Reply to author
Forward
0 new messages