using System.Collections.Immutable; using System.Text.Json.Serialization; namespace FrontendPlatformUno.DataContracts.Serialization { /* * When using the JsonSerializerContext you must add the JsonSerializableAttribute * for each type that you may need to serialize / deserialize including both the * concrete type and any interface that the concrete type implements. * For more information on the JsonSerializerContext see: * https://learn.microsoft.com/en-us/dotnet/standard/serialization/system-text-json/source-generation?WT.mc_id=DT-MVP-5002924 */ [JsonSerializable(typeof(WeatherForecast))] [JsonSerializable(typeof(WeatherForecast[]))] [JsonSerializable(typeof(IEnumerable))] [JsonSerializable(typeof(IImmutableList))] [JsonSerializable(typeof(ImmutableList))] [JsonSourceGenerationOptions(PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase)] public partial class WeatherForecastContext : JsonSerializerContext { } }