[luci] Help wtih JSON-RPC interface?

Johnny Turpin jturpin at industrynext.com
Mi Okt 1 20:26:51 CEST 2008


Hey, thanks Steven - I am gonna test all of the javascript clients I can
find... I have a couple more questions...

1) Should the JSON-RPC server work on the host machine dev version of
LuCI as well?

2) In case I can't find a JSON client library that is suitable and have
to go done the path of creating my own, can you provide an example of
what the auth login call should look like, and are the parameters named
or unnamed? (I think given one documented example, I can take that and
run with it for the rest of the API)

I guess specifically, in the case of /cgi-bin/luci/rpc/auth is there an
object that contains the login method - or are the methods at the top
level?


Thanks,

-jt

-----Original Message-----
From: luci-bounces at lists.subsignal.org
[mailto:luci-bounces at lists.subsignal.org] On Behalf Of Steven Barth
Sent: Tuesday, September 30, 2008 7:12 PM
To: luci at lists.subsignal.org
Subject: Re: [luci] Help wtih JSON-RPC interface?

Unfortunately this library generates invalid JSON-Requests.

They look like this:
{id:1,method:"methodname",params:[]}

but the JSON standard (RFC 4627) defines object-keys (as id, method and
params 
above) as strings which must be surrounded by "

So LuCI replies with a parse error as it cannot correctly parse the JSON

request.

We have not tested the JSON-RPC library with any JavaScript-Clients yet
but 
only with clients in other programming langauges like Python.

Greetings
Cyrus
_______________________________________________
luci mailing list
luci at lists.subsignal.org
https://lists.subsignal.org/mailman/listinfo/luci


More information about the luci mailing list