setting default json serialiser back to newtonsoft

This commit is contained in:
andy 2021-12-30 22:47:39 +00:00
parent 94f4435ad4
commit 50137b5ac6
3 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ namespace SpotifyAPI.Web
Assert.IsInstanceOf(typeof(SimplePaginator), defaultConfig.DefaultPaginator); Assert.IsInstanceOf(typeof(SimplePaginator), defaultConfig.DefaultPaginator);
Assert.IsInstanceOf(typeof(NetHttpClient), defaultConfig.HTTPClient); Assert.IsInstanceOf(typeof(NetHttpClient), defaultConfig.HTTPClient);
Assert.IsInstanceOf(typeof(TextJsonSerializer), defaultConfig.JSONSerializer); Assert.IsInstanceOf(typeof(NewtonsoftJSONSerializer), defaultConfig.JSONSerializer);
Assert.AreEqual(SpotifyUrls.APIV1, defaultConfig.BaseAddress); Assert.AreEqual(SpotifyUrls.APIV1, defaultConfig.BaseAddress);
Assert.AreEqual(null, defaultConfig.Authenticator); Assert.AreEqual(null, defaultConfig.Authenticator);
Assert.AreEqual(null, defaultConfig.HTTPLogger); Assert.AreEqual(null, defaultConfig.HTTPLogger);
@ -32,7 +32,7 @@ namespace SpotifyAPI.Web
Assert.IsInstanceOf(typeof(SimplePaginator), defaultConfig.DefaultPaginator); Assert.IsInstanceOf(typeof(SimplePaginator), defaultConfig.DefaultPaginator);
Assert.IsInstanceOf(typeof(NetHttpClient), defaultConfig.HTTPClient); Assert.IsInstanceOf(typeof(NetHttpClient), defaultConfig.HTTPClient);
Assert.IsInstanceOf(typeof(TextJsonSerializer), defaultConfig.JSONSerializer); Assert.IsInstanceOf(typeof(NewtonsoftJSONSerializer), defaultConfig.JSONSerializer);
Assert.AreEqual(SpotifyUrls.APIV1, defaultConfig.BaseAddress); Assert.AreEqual(SpotifyUrls.APIV1, defaultConfig.BaseAddress);
Assert.AreEqual(null, defaultConfig.HTTPLogger); Assert.AreEqual(null, defaultConfig.HTTPLogger);
Assert.AreEqual(null, defaultConfig.RetryHandler); Assert.AreEqual(null, defaultConfig.RetryHandler);

View File

@ -187,7 +187,7 @@ namespace SpotifyAPI.Web
return new SpotifyClientConfig( return new SpotifyClientConfig(
SpotifyUrls.APIV1, SpotifyUrls.APIV1,
null, null,
new TextJsonSerializer(), new NewtonsoftJSONSerializer(),
new NetHttpClient(), new NetHttpClient(),
null, null,
null, null,

View File

@ -18,7 +18,7 @@ namespace SpotifyAPI.Web.Http
public event EventHandler<IResponse>? ResponseReceived; public event EventHandler<IResponse>? ResponseReceived;
public APIConnector(Uri baseAddress, IAuthenticator authenticator) : public APIConnector(Uri baseAddress, IAuthenticator authenticator) :
this(baseAddress, authenticator, new TextJsonSerializer(), new NetHttpClient(), null, null) this(baseAddress, authenticator, new NewtonsoftJSONSerializer(), new NetHttpClient(), null, null)
{ } { }
public APIConnector( public APIConnector(
Uri baseAddress, Uri baseAddress,