?

Log in

No account? Create an account
XML-RPC Question - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

XML-RPC Question [Jan. 13th, 2003|12:09 am]
LiveJournal Client Discussions

lj_clients

[codedragon]
[mood |perplexed]

I might be posting this in the wrong place but...

Does anyone have any idea why the XML-RPC LJ protocol works like this:

<methodCall>
<methodName>foo</methodName>
<params>
<param>
<value><struct> -- Parameters --
</struct>
</value>
</param>

</params>
</methodCall>

When according to the XML-RPC documentation here, there should be a seperate <param></param> pair for each parameter?

Is it just me that thinks this is odd? Is it a misprint in the LJ documentation?

Cheers in advance,

CD
linkReply

Comments:
[User Picture]From: kumokasumi
2003-01-12 01:22 pm (UTC)
Looks right to me. LJ passes back a single parameter, which happens to be a struct.
(Reply) (Thread)
[User Picture]From: rjray
2003-01-12 07:20 pm (UTC)

This is a fairly-common construct. Separate parameters would be position-sensitive, and lead to more complexity in client applications. Doing it this way is pretty straightforward, as most languages in use have some sort of native data-type (hash table, dictionary, etc.) that the struct maps to directly.

(Reply) (Thread)
[User Picture]From: codedragon
2003-01-12 10:55 pm (UTC)

Re:

Ahhhh, the sound of the other shoe.

Thank you, that makes it much clearer.

CD
(Reply) (Parent) (Thread)