Custom JsonIgnore condition #91793
Unanswered
whoaskedfrfr
asked this question in
Q&A
Replies: 1 comment
-
There is no build-in way to do this afaik but you could write something like this yourself. Take a look at Type info modifiers. For conditionally ignoring a property, you can set the JsonPropertyInfo.ShouldSerialize property with your own custom logic. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
Is there a way to customize JsonIgnore condition?
As in, fully developer controlled thing? My idea was some kind of interface with single method bool Ignore() that is overridable. Is there something like this?
Beta Was this translation helpful? Give feedback.
All reactions