My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1648: JSON returned by rest API is not valid
1 person starred this issue and may be notified of changes. Back to list
Status:  WontFix
Owner:  ----
Closed:  Nov 2012


Sign in to add a comment
 
Reported by steffen....@googlemail.com, Nov 7, 2012
Affected Version: 2.5-RC1, 2.5.

What steps will reproduce the problem?
1. wget -q -O - "https://git.eclipse.org/r/changes/?format=JSON&q=project:mylyn/org.eclipse.mylyn.reviews+status:open&n=1"

The returned output is:

)]}'
[
  {
    "project": "mylyn/org.eclipse.mylyn.reviews",
    "branch": "master",
    "id": "I80e2745411d9932047d4f1e96d382bab960d4c32",
    "subject": "393798: support Gerrit 2.5",
    "status": "NEW",
    "created": "2012-11-07 20:28:20.000000000",
    "updated": "2012-11-07 20:41:28.000000000",
    "_sortkey": "0020ef1900002188",
    "_number": 8584,
    "owner": {
      "name": "Steffen Pingel"
    },
    "_more_changes": true
  }
]

I did not expect the ")]}'" characters at the start of the returned content.

Nov 7, 2012
Project Member #1 bklarson@gmail.com
This is by design, to prevent cross-site scripting issues.  The top line must be stripped off when parsing the output.  See the documentation at http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/rest-api.html.
Status: WontFix
Sign in to add a comment

Powered by Google Project Hosting