对具有可变数量的相似字段的JSON对象进行非军事化

I'm dealing with an API which can spit out JSON like this:

{
    "artist_name": "Wilhelm Stenhammar",
    "artist_name:1": "Helsingborg Symphony Orchestra",
    "artist_name:10": "NDR Radiophilharmonie",
    "artist_name:11": "Malm\u00f6 Opera Orchestra",
    "artist_name:12": "Radio Filharmonisch Orkest Holland",
    "artist_name:13": "Symphony Orchestra Of Norrlands Opera",
    "artist_name:14": "Pilsen Philharmonic Orchestra",
    "artist_name:15": "Latvian National Symphony",
    "artist_name:16": "SWR Radiofunkorchester, Kaiserslauten",
    "artist_name:17": "Orquesta Sinf\u00f3nica de San Luis Potos\u00ed",
    "artist_name:2": "Arvo Volmer",
    "artist_name:3": "V\u00e4ster\u00e5s Symphony Orchestra",
    "artist_name:4": "G\u00e4vle Symphony Orchestra",
    "artist_name:5": "Royal Danish Orchestra",
    "artist_name:6": "Stuttgart Philharmonic Orchestra",
    "artist_name:7": "Turku Philharmonic Orchestra",
    "artist_name:8": "Gothenburg Opera Orchestra",
    "artist_name:9": "Moscow Symphony Orchestra",
    "artist_uri": "spotify:artist:6gfRaesyLupPd0gDQaLwJV",
    "artist_uri:1": "spotify:artist:0K2m2TlgHkcp32NAZV6Omw",
    "artist_uri:10": "spotify:artist:6i9KFEJuHq78nMsQxeB1vR",
    "artist_uri:11": "spotify:artist:2bgesrziKLjYqObZ1i6KpO",
    "artist_uri:12": "spotify:artist:4TlqQbYkCmCDsrlkI2a09s",
    "artist_uri:13": "spotify:artist:1sKkv2iobrvnJtPtLJABf4",
    "artist_uri:14": "spotify:artist:5DEoOcExTp3y8yRzBVG1Bw",
    "artist_uri:15": "spotify:artist:4WP9O07oZuFjNpaoo8ktCf",
    "artist_uri:16": "spotify:artist:0AgZxnsoQq8uKYQEDQnO9N",
    "artist_uri:17": "spotify:artist:5qXInUZHHgmah0TPvUuq4l",
    "artist_uri:2": "spotify:artist:5zZjojCwIPWfzXOtSKTa0W",
    "artist_uri:3": "spotify:artist:4OYpD0LcwEZb5BdhyeJ7zT",
    "artist_uri:4": "spotify:artist:2DMF5PvArh8PhpR1YRDBgv",
    "artist_uri:5": "spotify:artist:3JZPA9VxDLixJfKDNbmlbT",
    "artist_uri:6": "spotify:artist:2G3SGwAd7uOTVm1y4IijBg",
    "artist_uri:7": "spotify:artist:2yJX6ev7Io4KagCeNdXFBB",
    "artist_uri:8": "spotify:artist:6fqElxCA09nHlqdkzY1sN9",
    "artist_uri:9": "spotify:artist:0udLXDzunp4xQRWhMNQPci",   }
}

The object has multiple artist names and a URI for each one. In some cases there may be more or less artists than in the example here, including the most common case of there only being 1.

{
    "artist_name": "Wilhelm Stenhammar",
    "artist_uri": "spotify:artist:6gfRaesyLupPd0gDQaLwJV",
}

What would be the best way to unmartial this object to capture all possible numbers of artist names and URIs? In the end I'd like to have an array of Artist objects with a Name and URI field, and the unmartialed array should reflect the order of the artists in the JSON.

The simplest thing you could do would be to unmarshal into a map[string]string and use it as is, but here is a neater thing you can do: define

type Artist struct {
    Name string
    URI string // could be *uri.URL instead
}

type Foo struct {
    Artists []Artist
}

And then write a func (f *Foo) UnmarshalJSON(data []byte) error { which unmarshals into a map[string]string, and then checks each pair of keys in turn. If it finds them, it appends to f.Artists, and if it doesn't, it stops.