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

Have a method in JSONBodyFilter to provide a replacement function apart from replacement string #852

Closed
dnandola-wyze opened this issue Oct 8, 2020 · 1 comment
Labels

Comments

@dnandola-wyze
Copy link
Contributor

I need a mechanism where I can hash the values of specific keys JSON body rather than replace them completely with "XXX". One way of doing that is to provide a function in JSONBodyFilters like:

@API(status = EXPERIMENTAL)
public static BodyFilter replaceJsonStringProperty(
final Predicate predicate, final Function<String, String> replacement) {

    return replaceStringFunction(predicate, replacement);
}

I can submit a PR for this and have the code ready but don't have access rights to submit a PR.

@dnandola-wyze dnandola-wyze changed the title Have a method in JSONBodyFilter to provide a replacement function apart from replacementstring Have a method in JSONBodyFilter to provide a replacement function apart from replacement string Oct 8, 2020
@whiskeysierra
Copy link
Collaborator

Released as 2.3.0 to central just now. Thanks for your contribution! 🎉 🤝

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

No branches or pull requests

2 participants