This class specifies how to deserialize a
Playlists
object.
It happens that the response could contain an object with name "playlist" that is a JSON Array when it has more than one child, but it is a JSON Object when there is only one child.
-
This is an example of a playlist object with multiple childs.
{
playlist : [
{
//CHILD_ONE
},
{
//CHILD_TWO
},
{
//CHILD_THREE
}
]
}
This is an example of a playlist object with just one child
{
playlist : {
//CHILD_ONE
}
}
This class takes the single child, creates an array and returns an array with that child in those cases.