-
Notifications
You must be signed in to change notification settings - Fork 264
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
Add a way to replace non String Json Properties #478
Comments
Makes sense, totally agree that this should be supported.
You're atleast the first one to ask for numbers. But yes, it's generic enough to be solved within logbook.
I'm rather looking into having
In a nutshell: https://en.wikipedia.org/wiki/Composition_over_inheritance Designing APIs is hard enough as it stands. Allowing for implementation inheritance makes so much harder. There is not a single problem, in my experience, that can be solved with class inheritance exclusively. Quite the contrary, the best solutions and cleanest class designs that I've seen avoid it like the plague. I'm not whether I can jump in and prepare something here, but I see two options that both rely on you helping yourself 😜
|
🙇♂️ |
Jackson-based filter which supports all data types based on property name: #512 |
It would be convenient to be able to replace numeric values in json the same way string values are replaced
Detailed Description
public static BodyFilter replaceJsonStringProperty(final Set properties, final String replacement)
could become
public static BodyFilter replaceJsonProperties(final Set properties, final String stringReplacement, float numericReplacement)
Context
I need to obfuscate numerci data in my json request and responses because they are sensitive data i don't want to log.
I believe I wouldn't be the only one with this need as it is foreseen for strings but not numeric values
BTW: why not allowing inheritance with final classes and why the package private classes ?
Thanks for this library that could really fulfill our needs if this feature request was implemented.
The text was updated successfully, but these errors were encountered: