#### [Abblix\.Utils](https://www.abblix.com/en/docs/api/abblix-utils 'index')
### [Abblix\.Utils\.Json](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Json 'Abblix\.Utils\.Json')

## JsonIgnoreNullsAttribute Class

Marks a class or struct so that all nullable properties are omitted from the serialized JSON
when their value is `null`, without requiring a per\-property
[System\.Text\.Json\.Serialization\.JsonIgnoreAttribute](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.serialization.jsonignoreattribute 'System\.Text\.Json\.Serialization\.JsonIgnoreAttribute') on each one\.

```csharp
public sealed class JsonIgnoreNullsAttribute : System.Attribute
```

Inheritance [System\.Object](https://learn.microsoft.com/en-us/dotnet/api/system.object 'System\.Object') → [System\.Attribute](https://learn.microsoft.com/en-us/dotnet/api/system.attribute 'System\.Attribute') → JsonIgnoreNullsAttribute

### Remarks
This attribute is a marker only\. For it to take effect, the [System\.Text\.Json\.JsonSerializerOptions](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializeroptions 'System\.Text\.Json\.JsonSerializerOptions')
used during serialization must have [Apply\(JsonTypeInfo\)](https://www.abblix.com/en/docs/api/abblix-utils/Abblix.Utils.Json.JsonIgnoreNullsModifier#Abblix.Utils.Json.JsonIgnoreNullsModifier.Apply(System.Text.Json.Serialization.Metadata.JsonTypeInfo) 'Abblix\.Utils\.Json\.JsonIgnoreNullsModifier\.Apply\(System\.Text\.Json\.Serialization\.Metadata\.JsonTypeInfo\)') registered as a
[System\.Text\.Json\.Serialization\.Metadata\.JsonTypeInfo](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.serialization.metadata.jsontypeinfo 'System\.Text\.Json\.Serialization\.Metadata\.JsonTypeInfo') modifier \- for example via
[System\.Text\.Json\.Serialization\.Metadata\.DefaultJsonTypeInfoResolver\.Modifiers](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.serialization.metadata.defaultjsontypeinforesolver.modifiers 'System\.Text\.Json\.Serialization\.Metadata\.DefaultJsonTypeInfoResolver\.Modifiers') added to
[System\.Text\.Json\.JsonSerializerOptions\.TypeInfoResolverChain](https://learn.microsoft.com/en-us/dotnet/api/system.text.json.jsonserializeroptions.typeinforesolverchain 'System\.Text\.Json\.JsonSerializerOptions\.TypeInfoResolverChain')\.
Abblix's `AddOidcControllers` registers the modifier automatically\.
