Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-33949

Jenkins 2.0 JSON API returns empty array elements in build "actions" array

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • Jenkins WAR: org.jenkins-ci.main:jenkins-war:2.0-beta-1
      Platform: Debian wheezy

      API responses for builds return include "actions" arrays, which are now containing both objects and arrays as elements. Prior to 2.0 this was not the case. E.g:

      {
      "actions" : [
      {

      },
      [

      ],
      {
      "causes" : [

      { "shortDescription" : "Started by upstream project \"authy_master\" build number 120", "upstreamBuild" : 120, "upstreamProject" : "authy_master", "upstreamUrl" : "job/authy_master/" }

      ]
      },
      {

      },
      ...

      Note the second element there is an empty array. Is this WAD? Returning JSON in such a format makes response parsing much more difficult.

          [JENKINS-33949] Jenkins 2.0 JSON API returns empty array elements in build "actions" array

          James Swaine created issue -
          James Swaine made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 169960 ] New: JNJira + In-Review [ 183704 ]
          Alex made changes -
          Attachment New: screenshot-1.png [ 55073 ]

            Unassigned Unassigned
            zoetermeer James Swaine
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: