Rest API Plugin return inconsistent json
Hi,
I've encountered that the Rest api plugin returns inconsistent json and it is causing my .net json serializer throws exceptions. For example:
http://localhost:1234/httpAuth/app/rest/changes?build=id:3
it returns
{"@count":"2", "change":[
{"@webLink":"http://localhost:1234/viewModification.html?modId=3&personal=false","@version":"792599340d1f243a78e4e95e2dd2f5667bfe95fc","@id":"3","@href":"/httpAuth/app/rest/changes/id:3"},
{"@webLink":"http://localhost:1234/viewModification.html?modId=2&personal=false","@version":"ae613ee6a7396c08b7696933479abaaf3ff64c81","@id":"2","@href":"/httpAuth/app/rest/changes/id:2"}
]}
but if I request http://localhost:1234/httpAuth/app/rest/changes?build=id:4
{"@count":"1","change":{"@webLink":"http://localhost:1234/viewModification.html?modId=4&personal=false","@version":"3c6e592c94112477b9858b9518c0d1c4a2b53550","@id":"4","@href":"/httpAuth/app/rest/changes/id:4"}}
The first response in the "change" part is an array of objects, but the second response is an object. Should they both are returning array? Although, if I change to get xml instead of json, the xml response is all good.
Cheers,
Ld
Please sign in to leave a comment.
Hello,
This is reported as TW-17478 in our issue tracker. Please watch/vote for it.