Skip to main content

Definition

Assembly: System.Text.Json.dll Namespace: System.Text.Json

Syntax

Summary

This type is defined in System.Text.Json.

Remarks

See Microsoft documentation for more information about the rest of the API.

Methods

IgnoreAuditFields Extension

Extension method from System.Text.Json.EasyAF_JsonSerializerOptionsExtensions
Stops ICreatedAuditable.DateCreated, CreatedById, IUpdatedAuditable.DateUpdated, and UpdatedById from being written when serializing any DbObservableObject.

Syntax

Parameters

Returns

Type: System.Text.Json.JsonSerializerOptions The same JsonSerializerOptions instance, so the call can be chained onto an object initializer.

Exceptions

Examples

Remarks

The audit properties are removed from each type’s serialization contract the first time that type is serialized, so there is no per-call cost. Every other System.Text.Json setting, including naming policies, JsonPropertyNameAttribute, and DefaultIgnoreCondition, applies as usual. Audit properties are still read during deserialization. If TypeInfoResolver is already set (for example, to a source-generated JsonSerializerContext), the modifier is added to it, so this works with Native AOT.