JSON Deserialize: which input type?

I’m using Spotify playlist api (https://api.spotify.com/v1/playlists/) and I want to get all the

  • artists
  • songnames
  • spotify URI
    from the songs in the playlist.

I have it working with only the artists and songnames.

Input into Deserialize JSON (JSON Sample)

{
“items”: [
{
“track”: {
“artists”: [
{
“name”: “Mart Hoogkamer”
}
],
“name”: “Ik Ga Zwemmen”
}
},
{
“track”: {
“artists”: [
{
“name”: “Stef Ekkel”
}
],
“name”: “Jammer Dan”
}
},

etcetera

Inputtype:
image

Now I add the URI (JSON Sample)

“{"items":[{"track":{"artists":[{"name":"Fokke Simons"}],"name":"Fancy","uri":"spotify:track:0kl5woA1n5AcZcdS0uiJFF"}},{"track":{"artists":[{"name":"Donnie"},{"name":"Frans Duijts"}],"name":"Koffie Of Thee","uri":"spotify:track:5xq3LHreXboBpWt0uTiqah"}},{"track":{"artists":[{"name":"Dast (Italy)"}],"name":"Glorious - Edit","uri":"spotify:track:3IYTbK5qDfwL4QN9OsSnTY"}}]}”

But the output from deserialize does not contain URI.

I think the issue is the Inputtype, but how do I select the correct one??? It is some kind of generated code:
image

… d70a20

If I just take Input type: json.linqJobject than I get this error by for each:

image

Thanks for your help!

also with normal json.linqjobject:

image

but sample is correct because it is from spotify respons

Give a start by:
Deserialize JObject - using the JSON String, out: myJOBject

For Looping:
For each Activity| List of items: myJObject("items").Values(Of JOBject) | Item: CurrentItem

  • log message: CurrentItem("track")("artists")(0)("name").Value(Of String)
  • log message: CurrentItem("name").Value(Of String)
1 Like

Visualizations for the above:


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.