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

Jackson-based body filter for JSON #512

Merged
merged 3 commits into from Jun 13, 2019
Merged

Conversation

skjolber
Copy link
Contributor

New JSON body filter.

Description

Add filter which uses Jackson to parse/serialize when filtering JSON. Supports both scalar values (i.e. string, number, boolean etc) and structures (tree, object).

Motivation and Context

Remove sensitive information (GDPR) and also cut down on log statement size (we're using stackdriver and there is a limit on statement size).

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@skjolber skjolber force-pushed the jsonFilter branch 2 times, most recently from 66db085 to 7f16cf3 Compare May 27, 2019 08:24
@zalando zalando deleted a comment May 27, 2019

return writer.toString();
} catch(Exception e) {
log.trace("Unable to filter body, is it a JSON?. Keep as-is. `{}`", e.getMessage());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Message doesn't really match what's happening.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better?

@whiskeysierra
Copy link
Collaborator

👍

@whiskeysierra whiskeysierra merged commit 3782861 into zalando:master Jun 13, 2019
@whiskeysierra
Copy link
Collaborator

Thanks for the contribution! 🎉

@skjolber skjolber deleted the jsonFilter branch June 13, 2019 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.

None yet

2 participants