diff --git a/src/encoder.cc b/src/encoder.cc index 4660fc9..511a9fa 100644 --- a/src/encoder.cc +++ b/src/encoder.cc @@ -93,6 +93,18 @@ string GetSignatureFromV8Type(Local& value) { return const_cast(DBUS_TYPE_DOUBLE_AS_STRING); } if (IsString(value)) { + // JR mods bellow this line ......................................... + char* jrData = strdup(*String::Utf8Value( + v8::Isolate::GetCurrent(), + value->ToString(Nan::GetCurrentContext()).ToLocalChecked()) + ); + char jrFirstInitial = jrData[0]; + char jrObjTest = '/'; + if( jrFirstInitial == jrObjTest ) { + // printf("Object path -> %s \n", jrData); + return const_cast(DBUS_TYPE_OBJECT_PATH_AS_STRING); + } + // JR mods above this line ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ return const_cast(DBUS_TYPE_STRING_AS_STRING); } if (IsArray(value)) {