Uploaded image for project: 'MusicBrainz Search Server'
  1. MusicBrainz Search Server
  2. SEARCH-383

JSON return an array called 'artist' instead of 'artists'

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2014-10-08
    • None
    • None
    • None

      Hi,

      Searching for artists, I use the following URL : http://musicbrainz.org/ws/2/artist?query=artist:"foo"&limit=10&fmt=json
      The response look like :

      { "created" => "2013-11-10T07:52:48.173Z",
      "count" => 506,
      "offset" => 0,
      "artist" => [...]
      }

      Accordingly to the doc, I expected to get an "artists" key instead of "artist".

          [SEARCH-383] JSON return an array called 'artist' instead of 'artists'

          Ulrich Klauer made changes -
          Link New: This issue has related issue MBS-7928 [ MBS-7928 ]

          Ulrich Klauer added a comment -

          Funnily, MBS itself fell into that trap, too.

          Ulrich Klauer added a comment - Funnily, MBS itself fell into that trap, too.

          jesus2099 added a comment -

          @steveedson I've just learned this myself thanks to MB's blog ← I always keep attentive eye on these release notes (don't limit an a category, watch all posts) each time to know if some impacts for me. You can keep an eye on this source if (like me) you rely on some resources from MB, it's the easiest and best source for API or website changes.

          jesus2099 added a comment - @steveedson I've just learned this myself thanks to MB's blog ← I always keep attentive eye on these release notes (don't limit an a category, watch all posts) each time to know if some impacts for me. You can keep an eye on this source if (like me) you rely on some resources from MB, it's the easiest and best source for API or website changes.

          From http://musicbrainz.org/doc/Development/JSON_Web_Service

          "WARNING: This web service is available on the production server (musicbrainz.org/ws/2/), but should be not be considered stable. There are still some known bugs, and we may decide to make some small changes to the API as documented below"

          That also applies to the search component of ws/2. So, no prior notice was given anywhere else because it is marked as a beta product and changes are to be expected.

          Nicolás Tamargo added a comment - From http://musicbrainz.org/doc/Development/JSON_Web_Service "WARNING: This web service is available on the production server (musicbrainz.org/ws/2/), but should be not be considered stable. There are still some known bugs, and we may decide to make some small changes to the API as documented below" That also applies to the search component of ws/2. So, no prior notice was given anywhere else because it is marked as a beta product and changes are to be expected.
          Nicolás Tamargo made changes -
          Comment [ From http://musicbrainz.org/doc/Development/JSON_Web_Service

          "WARNING: This web service is available on the production server (musicbrainz.org/ws/2/), but should be not be considered stable. There are still some known bugs, and we may decide to make some small changes to the API as documented below" ]

          Steve Edson added a comment -

          Why has something like this been changed without any notice?

          I implemented my application when the response was still returning the singular values. This was not noted as a bug anywhere.

          So by "Fixing" this issue, its caused a bug in my application.

          If an API has been configured to return a response in a particular format, regardless of grammatical issues, it either needs to

          • Stick to that format
          • Provide a versioned API
          • Give plenty of notice to developers that the change will occur

          Steve

          Steve Edson added a comment - Why has something like this been changed without any notice? I implemented my application when the response was still returning the singular values. This was not noted as a bug anywhere. So by "Fixing" this issue, its caused a bug in my application. If an API has been configured to return a response in a particular format, regardless of grammatical issues, it either needs to Stick to that format Provide a versioned API Give plenty of notice to developers that the change will occur Steve

          Paul Taylor added a comment -

          Tested against live, all working.

          Paul Taylor added a comment - Tested against live, all working.
          Paul Taylor made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Closed [ 6 ]

          Paul Taylor added a comment -

          Paul Taylor added a comment - Ah thanks for checking. Now fixed with tests for all entities https://bitbucket.org/metabrainz/search-server/commits/f1dce7d78cb2dd74be34b649492cb02021b0d39d
          Ian McEwen made changes -
          Resolution Original: Fixed [ 1 ]
          Status Original: Closed [ 6 ] New: Reopened [ 4 ]

            Unassigned Unassigned
            inkstak Sebastien Savater
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                2014-10-08