diff --git a/Directory.Packages.props b/Directory.Packages.props index a409d5a..0c892a7 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,7 +4,7 @@ - + diff --git a/MetaBrainz.Common.Json/JsonUtils.cs b/MetaBrainz.Common.Json/JsonUtils.cs index 58170de..05026b3 100644 --- a/MetaBrainz.Common.Json/JsonUtils.cs +++ b/MetaBrainz.Common.Json/JsonUtils.cs @@ -24,20 +24,6 @@ public static class JsonUtils { #region General Utilities - /// Deserializes JSON to an object of the specified type, using default options. - /// The JSON to deserialize. - /// The type of object to deserialize. - /// A newly deserialized object of type . - /// The options used match those returned by . - public static T? Deserialize(Stream json) => JsonUtils.Deserialize(json, JsonUtils.ReaderOptions); - - /// Deserializes JSON to an object of the specified type. - /// The JSON to deserialize. - /// The options to use for deserialization. - /// The type of object to deserialize. - /// A newly deserialized object of type . - public static T? Deserialize(Stream json, JsonSerializerOptions options) => JsonSerializer.Deserialize(json, options); - /// Deserializes JSON to an object of the specified type, using default options. /// The JSON to deserialize. /// The type of object to deserialize. @@ -71,28 +57,6 @@ public static class JsonUtils { CancellationToken cancellationToken = default) => JsonSerializer.DeserializeAsync(json, options, cancellationToken); - /// Deserializes an object from the JSON content of an HTTP response. - /// The response to process. - /// The specific type to deserialize. - /// The deserialized object. - /// - /// When an object of type could not be deserialized from the contents of . - /// - /// The options used match those returned by . - public static T GetJsonContent(HttpResponseMessage response) - => AsyncUtils.ResultOf(JsonUtils.GetJsonContentAsync(response)); - - /// Deserializes an object from the JSON content of an HTTP response. - /// The response to process. - /// The JSON serializer options to apply. - /// The specific type to deserialize. - /// The deserialized object. - /// - /// When an object of type could not be deserialized from the contents of . - /// - public static T GetJsonContent(HttpResponseMessage response, JsonSerializerOptions options) - => AsyncUtils.ResultOf(JsonUtils.GetJsonContentAsync(response, options)); - /// Deserializes an object from the JSON content of an HTTP response. /// The response to process. /// The cancellation token to cancel the operation. diff --git a/MetaBrainz.Common.Json/MetaBrainz.Common.Json.csproj b/MetaBrainz.Common.Json/MetaBrainz.Common.Json.csproj index 12cd39d..a238997 100644 --- a/MetaBrainz.Common.Json/MetaBrainz.Common.Json.csproj +++ b/MetaBrainz.Common.Json/MetaBrainz.Common.Json.csproj @@ -11,7 +11,7 @@ 2020, 2021, 2022, 2023, 2025 MetaBrainz.Common.Json MetaBrainz JSON - 6.0.3-pre + 7.0.0-pre