Right now, if someone wants to unmarshal, edit and remashal a playlist, it has to update the tags field as well as the marshal operation only uses those to write down the playlist. This was done to allow for "perfect" unmarshal/marshal operations, leading to easy-to-write tests. This concept is broken though when it comes to the usecase of this issue.
Remove the tags from the playlist data structure and create them on demand based on the contents of the playlist itself. Refactor the tests to so that they are more flexible: the order of the tags should not matter.
Right now, if someone wants to unmarshal, edit and remashal a playlist, it has to update the tags field as well as the marshal operation only uses those to write down the playlist. This was done to allow for "perfect" unmarshal/marshal operations, leading to easy-to-write tests. This concept is broken though when it comes to the usecase of this issue.
Remove the tags from the playlist data structure and create them on demand based on the contents of the playlist itself. Refactor the tests to so that they are more flexible: the order of the tags should not matter.