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 keeping unmapped keys #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

romaind
Copy link

@romaind romaind commented Oct 10, 2017

In my use case, I wanted to map some keys but keep others as is and did not want to have to map them with themselves all the time.
So I created a new option that tells the lib to keep unmapped key as is and return them in the output just as they were in the input.

Maybe it could be useful for others

Before this commit, only keys mentionned in the `Mapper` through the `map`
method were treated. Other input keys were ignored.
Now you can pass the option `keep_unmapped_keys` to the `normalize` method to
let unmapped keys go from input to output without being touched.
@romaind romaind force-pushed the allow-keeping-unmapped-keys branch from 87a5923 to 9e48455 Compare October 10, 2017 10:44
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.

1 participant