Closed Mailaender closed 4 years ago
Thanks for the suggestion. The web service and database use the same model classes, which is why they are all bundled together. We could potentially break it into three DLLs with one containing the shared code that both the web service and database reader depend on, but that wouldn't really reduce the dependencies.
A better solution might be to remove RestSharp entirely. I think the standard C# HttpClient
class would likely be sufficient when used with Json.NET.
This issue is still open.
Has there been any decision on this one? I think removing both dependencies (RestSharp and Json.NET) would be awesome and would make it even easier to use the API.
The Json.NET dependency will not be going away in the foreseeable future. It is used by the database reader. RestSharp should be relatively easy to replace, although we will have to change how we do the mocking for the unit tests.
I am going to close this issue as we no longer use RestSharp and the plan is to replace Json.NET with System.Text.Json
once version 5 is available.
We are using your cool GeoLite2 databases in our Open Source RTS game engine recreation project @OpenRA since version 1 of your .NET API:
Thanks for that already!
We now depend on Newtonsoft.Json.dll and RestSharp.dll although we don't use any JSON or REST anywhere in the game. It is just a hard dependency of your GeoIP2 library. Therefore I suggest to separate the local database parsing and the Web API into separate DLLs of the same project so we and others can avoid unnecessary dependencies.