How to interpret signature a(sa{sv}) #445
-
Hello togehter, i have a issue with the above DBus signature (sdbus version 1.0.0). Additionally: Thanks a lot. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The corresponding C++ type for You can use the same operations on
|
Beta Was this translation helpful? Give feedback.
The corresponding C++ type for
a(sa{sv})
isstd::vector<sdbus::Struct<std::string, std::map<std::string, sdbus::Variant>>>
. The error tells you that are going to deserialize a struct, but there is an object of another type serialized in the D-Bus message at that location (an array in this case).You can use the same operations on
sdbus::Struct
that you'd use on astd::tuple
. In newer sdbus-c++ versions, thesdbus::Struct
fully implements a tuple protocol, which makes it a tuple-like class (#343).v1.0
is quite old. I suggest you upgrade to one of the latest versions (v1.6
or, even better,v2.0
).