plneto / Synology.Api.Client

.NET/C# client for the Synology API
MIT License
21 stars 13 forks source link

Remove `Flurl` and `Newtonsoft.Json` #9

Closed FroggieFrog closed 1 year ago

FroggieFrog commented 1 year ago

This PR is kind of a rewrite to remove the dependencies on Flurl and Newtonsoft.Json. Instead HttpClient is used directly and serialization is done by System.Text.Json.

The tests were also adjusted and extended.

Maybe There is a breaking change in the API (ISynologyHttpClient).

If you don't like this kind of PRs: just close/delete it.

closes #8

ikocs commented 1 year ago

Good afternoon. Do I understand correctly that moving from Newtonsoft.Json to System.Text.Json will cause the library to no longer support netstandard 2.0?

plneto commented 1 year ago

Good afternoon. Do I understand correctly that moving from Newtonsoft.Json to System.Text.Json will cause the library to no longer support netstandard 2.0?

This only changes some of the dependencies. The library will still support netstandard 2.0.

FroggieFrog commented 1 year ago

I don't know why the AppVeyor build fails, but I think it could be because I used raw string literals from C# 11.

Executing the tests locally works fine: grafik

FroggieFrog commented 1 year ago

Ok, I just confirmed that raw string literals were the reason for failed the tests. Now it is all working as expected.

plneto commented 1 year ago

Thanks for the effort you put into this PR. I've been busy but I'll try to review it soon.

plneto commented 1 year ago

Looks good to me. I'm ready to merge it once you fix the unit test and update your branch. Thanks