using System.Text.Json; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; namespace IdentityShroud.Core.EFCore; public class DictionaryToJsonConverter : ValueConverter, string> where TKey : notnull { public DictionaryToJsonConverter() : base( v => JsonSerializer.Serialize(v), v => JsonSerializer.Deserialize>(v) ?? new()) { } }