Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow non-string dict key types #115

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

QuadratClown
Copy link

@QuadratClown QuadratClown commented Nov 16, 2022

Javascript does not allow keys for objects to be other than string or symbol. However, node-dbus-next uses native js objects for the dbus dict format, which allow keys of any type. As keys in js objects are auto-converted to string, marshalling will throw an error for non-string dict key types.

This pull request simply adds a conversion in marshall-compat.js that auto-converts faulty strings keys back to their respective type.

This pull requests fixes #79

@alexcastillo
Copy link

@acrisci, any chance we can get this merged? 🙏🏼

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

Successfully merging this pull request may close these issues.

Unable to pass numeric values as an object key.
2 participants