Update dependencies and replace Newtonsoft.Json with System.Text.Json #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Upgraded Spectre.Console in the console sample to v0.50.0. Updated test project to target net9.0 and refreshed package versions for xunit, test SDK, and coverlet. Removed GlobalUsings.cs and added explicit Xunit using in test file.
This pull request introduces several updates to the OpenWeatherMapSharp project, focusing on upgrading dependencies, improving code clarity, and enhancing functionality. Key changes include transitioning to .NET 9.0, updating package versions, refactoring service interfaces, and replacing
Newtonsoft.JsonwithSystem.Text.Jsonfor serialization. Additionally, theLanguageCodeenum has been expanded to include more supported languages.Framework and Dependency Upgrades:
.github/workflows/dotnet.yml: Updated the .NET version from7.0.xto9.0.xfor CI workflows.samples/OpenWeatherMapSharp.Console/OpenWeatherMapSharp.Console.csproj: Upgraded the target framework tonet9.0and updated theSpectre.Consolepackage from version0.47.0to0.50.0.Code Enhancements:
samples/OpenWeatherMapSharp.Console/Program.cs: Refactored the console application to improve readability and maintainability, including better error handling, structured sections, and enhanced UI formatting for weather data.src/OpenWeatherMapSharp/IOpenWeatherMapService.cs: Improved documentation for service methods and updated parameter descriptions for clarity. Deprecated methods now include updated warnings about maintenance status.Serialization Refactor:
Newtonsoft.JsonwithSystem.Text.Jsonacross multiple model files for serialization:src/OpenWeatherMapSharp/Models/City.cs: Updated property attributes to use[JsonPropertyName]and improved property descriptions.src/OpenWeatherMapSharp/Models/Clouds.cs: Transitioned to[JsonPropertyName]and clarified the cloudiness percentage description.src/OpenWeatherMapSharp/Models/Coordinates.cs: Updated attributes to[JsonPropertyName]and refined coordinate descriptions.Enum Expansion:
src/OpenWeatherMapSharp/Models/Enums/LanguageCode.cs: Expanded theLanguageCodeenum to include additional supported languages, aligning with OpenWeatherMap API specifications. Each language now includes detailed documentation.