Jason Howk created JENKINS-13336:
------------------------------------
Summary: Invalid JSON is produced during remote api operations
when a changeSet contains duplicate keys.
Key: JENKINS-13336
URL: https://issues.jenkins-ci.org/browse/JENKINS-13336
Project: Jenkins
Issue Type: Bug
Components: core
Affects Versions: current
Environment: Jenkins Version 1.458 on Linux (centos). Also appears in
1.457
Reporter: Jason Howk
Priority: Critical
Use this URL as a working example:
http://ci.jenkins-ci.org/view/Jenkins%20core/job/jenkins_main_trunk/1637/api/json
When looking at a specific build for a given job, the JSON produced for the
Remote API functionality is invalid when the changeSet is not null. Using the
example above, the JSON returned from this api call results in the changeSet
object containing two author and msg objects. These duplicate keys are causing
errors with external parsers that are downloading data using the api.
Steps to reproduce:
1.) Using the URL above, attempt to validate the JSON using JSLint
(www.jslint.com)
2.) You will receive a duplicate 'author' and 'msg' error.
3.) Using a build that does not have a changeSet does not contain the
duplicates and therefore produces valid JSON.
https://builds.apache.org/job/ActiveMQ/918/api/json can also be used (Jenkins
1.457) to verify. A duplicate changeSet/items/msg will be found.
Expected result:
1.) Data should validate properly (and therefore parse.)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira