File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,28 @@ namespace Encoder {
103103 return const_cast <char *>(DBUS_TYPE_ARRAY_AS_STRING DBUS_TYPE_STRING_AS_STRING);
104104 }
105105 }
106+ if (lastArrayItem->IsArray ()) {
107+ for (unsigned int i = 0 ; i < arrayDataLength; ++i) {
108+ Local<Value> arrayItem = arrayData->Get (i);
109+ if (!arrayItem->IsArray ())
110+ break ;
111+ if (i == (arrayDataLength - 1 ))
112+ return const_cast <char *>(DBUS_TYPE_ARRAY_AS_STRING DBUS_TYPE_ARRAY_AS_STRING
113+ DBUS_TYPE_VARIANT_AS_STRING);
114+ }
115+ }
116+ if (lastArrayItem->IsObject ()) {
117+ for (unsigned int i = 0 ; i < arrayDataLength; ++i) {
118+ Local<Value> arrayItem = arrayData->Get (i);
119+ if (!arrayItem->IsObject ())
120+ break ;
121+ if (i == (arrayDataLength - 1 ))
122+ return const_cast <char *>(DBUS_TYPE_ARRAY_AS_STRING DBUS_TYPE_ARRAY_AS_STRING
123+ DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
124+ DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
125+ DBUS_DICT_ENTRY_END_CHAR_AS_STRING);
126+ }
127+ }
106128 return const_cast <char *>(DBUS_TYPE_ARRAY_AS_STRING DBUS_TYPE_VARIANT_AS_STRING);
107129 } else if (value->IsObject ()) {
108130 return const_cast <char *>(DBUS_TYPE_ARRAY_AS_STRING
You can’t perform that action at this time.
0 commit comments