Closed AngryJKirk closed 7 months ago
The latest version is 4.1.0, please try with that
The same issue with 4.1.0
21/02/2024
15:15:53
com.adamratzman.spotify.SpotifyException$ParseException: Unable to parse {"collaborative":false,"description":"","external_urls":{"spotify":"https://open.spotify.com/playlist/0b6zN2PUiMnjLsJ2DYiScj"},"followers":{"href":null,"total":0},"href":"https://api.spotify.com/v1/playlists/0b6zN2PUiMnjLsJ2DYiScj","id":"0b6zN2PUiMnjLsJ2DYiScj","images":null,"name":"Vas3k.Music, February 2024","owner":{"display_name":"Yaroslav","external_urls":{"spotify":"https://open.spotify.com/user/0vyvjxn41lxn5tcbemyq2fbd2"},"href":"https://api.spotify.com/v1/users/0vyvjxn41lxn5tcbemyq2fbd2","id":"0vyvjxn41lxn5tcbemyq2fbd2","type":"user","uri":"spotify:user:0vyvjxn41lxn5tcbemyq2fbd2"},"primary_color":null,"public":true,"snapshot_id":"MSw4OTdlNzVmZDFhOTQ0NGJmZGJiZjdjYjQ1M2FjM2RkODM2MjIwODM5","tracks":{"href":"https://api.spotify.com/v1/playlists/0b6zN2PUiMnjLsJ2DYiScj/tracks?offset=0&limit=0","items":[],"limit":0,"next":null,"offset":0,"previous":null,"total":0},"type":"playlist","uri":"spotify:playlist:0b6zN2PUiMnjLsJ2DYiScj"} (Unexpected JSON token at offset 270: Expected start of the array '[', but had ':' instead at path: $.images
But that's definitely the problem with a type nullability, I guess serialization framework expects the images
property to be non null, right?
I believe you’re correct. This should be an easy fix, I will try to have a release today, though Spotify keeps making previously-non null properties nullable so I need to figure out a strategy to handle these regressions. Maybe a base serializer that knows how to create “empty” versions of types, or a transformer that uses reflection to know which properties shouldn’t be null but are
if you are in need of a workaround right now, you can attach a custom serializer to whichever playlist class this is
It's fine, no hurry at all :) Thank you!
Describe the bug Here is the stack trace:
To Reproduce Here is how I call the service
I haven't changed anything in years except for updating the dependency version.
Expected behavior No exception should happen
Additional context
Basically what I see is this property is not expected to be null, but an empty array instead.
Probably spotify has changed something?
I am using the latest version, 4.0.2