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

Filter the JSON based on a Value #175

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

LeakyBucket
Copy link

This adds a redact option to the derive.

I've recently had a few situations where it is undesirable to send null to an external API (GraphQL, enum attributes). I've implemented a couple of ugly solutions in my own code but thought it would be really nice if I could just specify an explicit empty indicator and have that entire pair omitted from the generated JSON.

This PR does that.

This allows for the implementor of a struct to specify that attributes with a given value should not be included in the generated `JSON`.
@coveralls
Copy link

coveralls commented Sep 11, 2018

Pull Request Test Coverage Report for Build 243

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 89.474%

Totals Coverage Status
Change from base Build 236: 0.05%
Covered Lines: 187
Relevant Lines: 209

💛 - Coveralls

@LeakyBucket
Copy link
Author

@devinus any interest in this?

@devinus devinus force-pushed the master branch 22 times, most recently from 29a475d to e0a080a Compare July 23, 2021 07:52
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.

2 participants