JSON parsing for API requests should handle single value lists

XMLWordPrintable

    • Type: Bug
    • Resolution: Answered
    • Priority: Low
    • Component/s: None
    • None

      NOTE: This bug report is for JIRA Cloud. Using JIRA Server? See the corresponding bug report.

      I'm making an API request to the REST API to update an issue. The request looks like:
      [:put,
      "/rest/api/2/issue/57638",
      "{\"update\":{\"fields\":

      {\"customfield_12250\":\"flexd\"}

      ,\"comment\":[{\"add\":{\"body\":\"test commit\"}}],\"transition\":

      {\"id\":751}

      }}",

      {"Accept"=>"application/json", "Content-Type"=>"application/json"}

      ]

      I get back a 400 response with the given body:

      {"errorMessages":["Can not deserialize instance of java.util.ArrayList out of START_OBJECT token\n at [Source: org.apache.catalina.connector.CoyoteInputStream@28966bb8; line: 1, column: 12] (through reference chain: com.atlassian.jira.rest.v2.issue.IssueUpdateBean[\"update\"])"]}

      When I send that comment on it's own, without associated other data things work

              Assignee:
              Unassigned
              Reporter:
              David Golombek
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: