Skip to content

Feature request: Add DateOnly Converter to Logging JsonSerializer #501

@BradKnowles

Description

@BradKnowles

Use case

If the object being logged has a DateOnly property the Logging framework throws an exception.

Serialization and deserialization of 'System.DateOnly' instances are not supported. The unsupported member type is located on type 'System.Nullable``1[System.DateOnly]'

Solution/User Experience

Ideally, the Logging framework would handle DateOnly fields without any additional or custom logic from application developers.

Alternative solutions

At the moment, the workaround is to add a [JsonConverter(typeof(DateOnlyJsonConverter))] attribute to each property of the object being serialized, where DateOnlyConverter is a custom converter that is each of our applications.

Acknowledgment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    👀 In review

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions