[yast-devel] WebYaST: Hash in Hash in YastService.Call
Hi hackers, in rest-service/plugins/users/app/models/user.rb a hash is created:
parameters = { "index" => ["s", "uid"], "user_attributes" => ["as", [ "cn" ]] }
and then passed as parameter like this:
users_map = YastService.Call("YaPI::USERS::UsersGet", parameters)
The hash requires a list of values, first one being a type identifier, the
second being the real value. I found out that valid types are: s, i, b, a
resp. as for string, integer, boolean and array resp. array of string.
But I need to define a hash here. How can I pass a hash as hashvalue?
Thanks for a hint.
Ciao,
Daniel
--
J. Daniel Schmidt
* J. Daniel Schmidt
The hash requires a list of values, first one being a type identifier, the second being the real value. I found out that valid types are: s, i, b, a resp. as for string, integer, boolean and array resp. array of string. But I need to define a hash here. How can I pass a hash as hashvalue?
http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-sig... defines the type encoding for D-Bus. If I interpret this correctly, as Hash ('dict' in D-Bus speak) is an array ('a') of key-value pairs ('e{}'). Hth, Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
On 13.10.2009 08:31, Klaus Kaempf wrote:
* J. Daniel Schmidt
[Oct 12. 2009 18:46]: The hash requires a list of values, first one being a type identifier, the second being the real value. I found out that valid types are: s, i, b, a resp. as for string, integer, boolean and array resp. array of string. But I need to define a hash here. How can I pass a hash as hashvalue?
http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-sig... defines the type encoding for D-Bus.
If I interpret this correctly, as Hash ('dict' in D-Bus speak) is an array ('a') of key-value pairs ('e{}').
'e{}' means a key-value pair which can be used only internally inside an array.
The signature for whole hash is actually something like 'a{ss}' for
map
participants (3)
-
J. Daniel Schmidt
-
Klaus Kaempf
-
Ladislav Slezak