public override FSharpSet <T> Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
 {
     try
     {
         return(SetModule.OfSeq(reader.DeserializeArray <T>(options)));
     }
     catch (Exception ex)
     {
         throw new JsonException(
                   $"Error when deserialize FSharpSet<{typeof(T).Name}>", ex);
     }
 }
Esempio n. 2
0
 public override FSharpMap <TKey, TValue> Read(ref Utf8JsonReader reader, Type typeToConvert,
                                               JsonSerializerOptions options)
 {
     try
     {
         return(MapModule.OfSeq(reader.DeserializeArray <Tuple <TKey, TValue> >(options)));
     }
     catch (Exception ex)
     {
         throw new JsonException(
                   $"Error when deserialize FSharpMap<{typeof(TKey).Name},{typeof(TValue).Name}>", ex);
     }
 }