Skip to content

Serialize MiniProfiler\Timing class with System.Text.Json #630

Closed
@KLuuKer

Description

@KLuuKer

I currently json serialize the MiniProfiler instance with Newtonsoft Json.
So i can transport the profiling data to some other service layer (yes bad design i need shared storage i know).

But i would like to completely switch to System.Text.Json instead,
and also use it's source generator to remove reflection where possible
https://devblogs.microsoft.com/dotnet/try-the-new-system-text-json-source-generator/

but it doesn't support data contract attributes....
could you add attributes that are supported by system.text.json?
https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/ignore-properties

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions