Hello Community,
today I tried to call Ansible Automation Platform (AAP) release 2.5 API, e.g.
/api/controller/v2/job_templates/?page_size=100
However, calling json.loads with the response fails. The returned JSON has the following deviations from the standard:
- All strings are enclosed in single quotes instead of double quotes.
- All boolean values (True and False) are not enclosed in double quotes.
- All None values are also not enclosed in double quotes.
This causes json.loads to abort with an exception.
A month ago, the same Python source code worked without any problems.
In the header of the API call the content type is set to:
request.add_header("Content-Type", "application/json")
Is it possible to configure the JSON return format of API calls in the AAP?
Or is there another way to get a valid JSON response?
Thanks for hints and tips.
Best regards
Stefan