Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Unable to handle nested dictionaries #25

Open
mjohnson9 opened this issue May 22, 2012 · 4 comments
Open

Unable to handle nested dictionaries #25

mjohnson9 opened this issue May 22, 2012 · 4 comments

Comments

@mjohnson9
Copy link

While attempting to implement the Protocols property from the org.freedesktop.Telepathy.ConnectionManager interface, I ran into the fact that IDictionary<string, IDictionary<string, Parameter>> results in a System.ArgumentException: The type of an array must be a single complete type.

Is this intended, or should the library be capable of handling nested dictionaries?

@Ummon
Copy link

Ummon commented Aug 17, 2012

I got the same issue with the method 'GetSettings()' from 'org.freedesktop.NetworkManager.Settings.Connection'.

Did you find a workaround?

http://projects.gnome.org/NetworkManager/developers/api/09/spec.html#org.freedesktop.NetworkManager.Settings.Connection

@Ummon
Copy link

Ummon commented Aug 17, 2012

I randomly replace the method content of Signature.MakeDict(..) :

return MakeArray (MakeDictEntry (keyType, valueType));

by

return MakeDictEntry (keyType, valueType);

And it seems to work, but I can't guarantee that's the right solution. A project developer has to confirm this.

@Jerrill
Copy link

Jerrill commented Aug 21, 2012

I have the same issue. I have the following connman DBus method:

<method name="GetServices">
     <arg name="services" type="a(oa{sv})" direction="out"/>
 </method>

With the NDesk implementation, the following worked:

IDictionary<string, IDictionary<string, object>> GetServices();

I made the change that Ummon recommended and everything seems to work now as well. If this isn't the right way to code the interface method, then what would it be?

@bnbot
Copy link

bnbot commented Jun 9, 2021

Issues go stale after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants