Skip to content

Move the System.Text.Json support to an opt-in type mapping plugin #4846

@roji

Description

@roji

When using NativeAOT/trimming, System.Text.Json accounts for almost 2MB; the linker can't know when it's not being used. One way to deal with this is to move it out to a plugin, so the user opts into it when they need it.

Another reason to do this, is to provide an API point where users would be able to set JSON configuration. So when adding the plugin, users would be able to specify the JSON serialization options, and maybe also to specify user CLR types which should be written as json or jsonb (by default).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions