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

Reason for cleanKey bad_chars? #27

Open
mtmcgrew opened this issue Jan 4, 2016 · 1 comment
Open

Reason for cleanKey bad_chars? #27

mtmcgrew opened this issue Jan 4, 2016 · 1 comment

Comments

@mtmcgrew
Copy link
Contributor

mtmcgrew commented Jan 4, 2016

What's the reasoning behind each character in the bad_chars list in cleanKey?

bad_chars = ['\0', '.', '$']

It translates things like SHELL32.dll into SHELL32_dll

@marnao
Copy link
Contributor

marnao commented Jan 5, 2016

Good question-- thanks for raising this.

tl;dr: bad design

A certain NoSQL database does not allow "." (and a few other characters) to be in the key name. This cleanup should really be done on output (just prior to inserting into the database) rather than in the core framework.

We would be open to a pull request that removes this and any other unnecessary cleanup. Ideally I think we would only have the following 2 restrictions: serializes to JSON and contains only valid UTF-8

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

No branches or pull requests

2 participants