I am not a developer, just the guy that is blocked on a project because of this.
I was given an app that is supposed to create a json list. It is then meant to be hit by a url that will create a drop down in Rundeck that fills out build number options from Jenkins. Originally i could not get it to work without throwing a TypeError: the JSON object must be str, not 'bytes' error. I can get it working in a browser by doing:
How would I convert the json into something that is readable by Rundeck? Per rundeck: Three styles of return data are supported: simple list, simple object, and a name/value list. I need it to be a name/value list, which it is.
Here is an example of the returned json:
The whole app is only 70 ish lines, so if it would be more help to see the whole thing I can upload it somewhere.
I was given an app that is supposed to create a json list. It is then meant to be hit by a url that will create a drop down in Rundeck that fills out build number options from Jenkins. Originally i could not get it to work without throwing a TypeError: the JSON object must be str, not 'bytes' error. I can get it working in a browser by doing:
def parseJenkinsJSON(json_text): str_response = json_text.readall().decode('utf-8') json_data = json.loads(str_response)but now rundeck will throw Exception: java.lang.Exception: Unexpected content type received: text/html; charset=utf-8.
How would I convert the json into something that is readable by Rundeck? Per rundeck: Three styles of return data are supported: simple list, simple object, and a name/value list. I need it to be a name/value list, which it is.
Here is an example of the returned json:
[{"name":" rms-9.06.3_390 #67","value":"http://myurl.com/job/rms-9.06.3_390/67/artifact/application-web/build/libs/rms.war"}]
The whole app is only 70 ish lines, so if it would be more help to see the whole thing I can upload it somewhere.