JSON: Support [JsonConverter]
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- PR merge metrics
- PR metrics pending
Description
System.Text.Json has [`[JsonConverter]`](https://docs.microsoft.com/en-us/dotnet/api/system.text.json.serialization.jsonconverterattribute?view=net-10.0), which can be used with e.g. [`JsonStringEnumConverter`](https://docs.microsoft.com/en-us/dotnet/api/system.text.json.serialization.jsonstringenumconverter?view=net-6.0) to map CLR enums to strings in the JSON document (or do other conversions).
I'm not sure if we plan to support arbitrary EF value converters for JSON properties (we should probably open an issue for that). If we do, then we could set up the appropriate enum/string converter when we see this attribute.
Originally requested for Npgsql by @sergeyshaykhullin in https://github.com/npgsql/efcore.pg/issues/2325
Contributor guide
Assessment
This issue has not been assessed yet.