Updated to C# 12
This commit is contained in:
@@ -13,18 +13,16 @@ 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(byte[]),
|
||||
typeof(List<byte>),
|
||||
typeof(IEnumerable<byte>)
|
||||
};
|
||||
];
|
||||
|
||||
/// <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