mirror of
https://github.com/bitwarden/server
synced 2026-01-04 17:43:53 +00:00
[PM-5052] Upgrade to .NET 8 (#3461)
* Upgrade to .NET 8 * Linting * Clean up old JSON deserialization code * More .NET 8-oriented linting * Light feedback * Get rid of old test we don't know the root issue for * Fix a new test * Remove now-unnecessary Renovate constraint * Use Any() * Somehow a 6.0 tooling config we don't need snuck back in * Space out properties that always change per release * Bump a few core packages since the last update
This commit is contained in:
@@ -45,18 +45,6 @@ public static class JsonHelpers
|
||||
};
|
||||
}
|
||||
|
||||
[Obsolete("This is built into .NET 6, it SHOULD be removed when we upgrade")]
|
||||
public static T ToObject<T>(this JsonElement element, JsonSerializerOptions options = null)
|
||||
{
|
||||
return JsonSerializer.Deserialize<T>(element.GetRawText(), options ?? Default);
|
||||
}
|
||||
|
||||
[Obsolete("This is built into .NET 6, it SHOULD be removed when we upgrade")]
|
||||
public static T ToObject<T>(this JsonDocument document, JsonSerializerOptions options = null)
|
||||
{
|
||||
return JsonSerializer.Deserialize<T>(document.RootElement.GetRawText(), options ?? default);
|
||||
}
|
||||
|
||||
public static T DeserializeOrNew<T>(string json, JsonSerializerOptions options = null)
|
||||
where T : new()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user