Look at Jenkins's Python API and JSON API, feeling that the difference is not much, but there is a difference, so use beyondcompare for comparative analysis.
1, the Jenkins base URL API comparison
To the left: http://server:port/jenkins/api/python?pretty=true
To the right: http://server:port/jenkins/api/json?pretty=true
2. Jenkins Job API Comparison
To the left: http://server:port/jenkins/job/JOB_NAME/api/python?pretty=true
To the right: http://server:port/jenkins/job/JOB_NAME/api/json?pretty=true
3. Jenkins Build API Comparison
To the left: http://server:port/jenkins/job/JOB_NAME/BUILD_NUMBER/api/python?pretty=true
To the right: http://server:port/jenkins/job/JOB_NAME/BUILD_NUMBER/api/json?pretty=true
4. Jenkins View API Comparison
To the left: http://server:port/jenkins/view/VIEW_NAME/api/python?pretty=true
To the right: http://server:port/jenkins/view/VIEW_NAME/api/json?pretty=true
5. Jenkins nodes API comparison
To the left: http://server:port/jenkins/computer/api/python?pretty=true
To the right: http://server:port/jenkins/computer/api/json?pretty=true
Different from the above API, you can see that Python and JSON (JAVASCRIPT) syntax differ in two ways:
* Python has a Boolean value of: True/false;json the value of the Boolean type is: True/false
* The null value for Python is: null for None;json
The Jenkins Python API is different from the JSON API