dont ommit empty json lists

This commit is contained in:
sentriz
2020-02-21 03:28:56 +00:00
parent 526de91566
commit 9b8a35df00
3 changed files with 10 additions and 7 deletions

View File

@@ -83,7 +83,7 @@ func NewError(code int, message string, a ...interface{}) *Response {
}
type Albums struct {
List []*Album `xml:"album" json:"album,omitempty"`
List []*Album `xml:"album" json:"album"`
}
type Album struct {
@@ -134,7 +134,7 @@ type TrackChild struct {
}
type Artists struct {
List []*Index `xml:"index,omitempty" json:"index,omitempty"`
List []*Index `xml:"index,omitempty" json:"index"`
}
type Artist struct {
@@ -212,7 +212,7 @@ type User struct {
}
type Playlists struct {
List []*Playlist `xml:"playlist" json:"playlist,omitempty"`
List []*Playlist `xml:"playlist" json:"playlist"`
}
type Playlist struct {
@@ -243,15 +243,15 @@ type ArtistInfo struct {
SimilarArtist []*SimilarArtist `xml:"similarArtist,omitempty" json:"similarArtist,omitempty"`
}
type Genres struct {
List []*Genre `xml:"genre" json:"genre"`
}
type Genre struct {
SongCount string `xml:"songCount,attr"`
AlbumCount string `xml:"albumCount,attr"`
}
type Genres struct {
Genre []*Genres `xml:"genre" json:"genre"`
}
type PlayQueue struct {
Current int `xml:"current,attr,omitempty" json:"current,omitempty"`
Position int `xml:"position,attr,omitempty" json:"position,omitempty"`