Comments (6)
This issue seems to be happening to multiple developers, including myself, and has been discussed previously in #925, #926 and #928. For me, it randomly stopped happening after few days.
from spotifyapi-net.
This issue seems to be happening to multiple developers, including myself, and has been discussed previously in #925, #926 and #928. For me, it randomly stopped happening after few days.
I'm aware that this was discussed. I raised the issue out of #925 to further spread awareness for it.
The Newtonsoft.JSON Deserializer should convert int
to double
if int is returned from the API and double is expected. Thats why the approach of changing the types might work long term.
from spotifyapi-net.
Well I should read all the discussions beforehand. It seems the Serializer has been modified to convert.
My bad!
from spotifyapi-net.
Hi @Inzaniity,
I'm also experiencing the JsonReaderException on some properties, for instance album.total_tracks
. Updating to the latest SpotifyAPI.Web (7.1.1) did not fix them all.
If I add the DoubleToIntConverter
attribute to the properties that still cause the exceptions it's ok again.
So it seems to me we should add the DoubleToIntConverter
attribute to all int properties so it doesn't break when Spotify decides to return doubles/floats somewhere. What do you think?
from spotifyapi-net.
Hi @Inzaniity, I'm also experiencing the JsonReaderException on some properties, for instance
album.total_tracks
. Updating to the latest SpotifyAPI.Web (7.1.1) did not fix them all.If I add the
DoubleToIntConverter
attribute to the properties that still cause the exceptions it's ok again.So it seems to me we should add the
DoubleToIntConverter
attribute to all int properties so it doesn't break when Spotify decides to return doubles/floats somewhere. What do you think?
I mean that is what I did but on an older code base. So yeah, converting all expected ints seems to be the solution here.
from spotifyapi-net.
A Spotify developer confirmed a fix for this in the discussion on the Spotify developer forum
An optimization in the deserialization of JSON in upstream was causing the serializer to default to double types for integer values. The optimization was not applied to all queries, and several tools were sanitizing the response which was the reason we did not uncover this from the start.
from spotifyapi-net.
Related Issues (20)
- How to get Song name and other data? HOT 1
- CLI - Persistent Config Example macOS issue "Address already in use" HOT 1
- CustomHTML Example not compiling HOT 1
- can not use any other spotify account when running Example.ASP HOT 1
- Can't install the package in UWP HOT 1
- Forbidden error with Library.GetTracks datas HOT 2
- .NET Framework support HOT 7
- Cancellation token in PaginateAll method HOT 1
- RobiniaDocs API Explorer HOT 1
- _server.AuthorizationCodeReceived isn't raised when receiving an access token
- Local files in FullPlaylist bug HOT 9
- JsonReaderException when getting Artist. HOT 7
- Feature: Provide "html_description" on SimpleEpisode and FullEpisode HOT 1
- Create Playlist Fails HOT 2
- Possible incorrect type inference when fetching playlist tracks HOT 2
- Not able to install the packge via nuget - There are no versions available for the package HOT 1
- BUG: PlaylistClient.ReplaceItems() checking for HttpStatusCode.Created when Spotify returns HttpStatusCode.OK HOT 1
- What happened to SetShuffle, SetRepeat, SkipNext and maybe more?? HOT 10
- Exception thrown when interacting with Player HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spotifyapi-net.