Updated to C# 12
This commit is contained in:
@@ -14,19 +14,17 @@ namespace Newtonsoft.Json
|
||||
/// <summary>
|
||||
/// List of known types to use this converver.
|
||||
/// </summary>
|
||||
public static readonly Type[] KnownTypes = new[]
|
||||
{
|
||||
public static readonly Type[] KnownTypes =
|
||||
[
|
||||
typeof(IPAddress),
|
||||
typeof(IPAddress[]),
|
||||
typeof(List<IPAddress>),
|
||||
typeof(IEnumerable<IPAddress>)
|
||||
};
|
||||
];
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return KnownTypes.Contains(objectType);
|
||||
}
|
||||
=> KnownTypes.Contains(objectType);
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
|
||||
Reference in New Issue
Block a user