Skip to content Skip to sidebar Skip to footer

Conversion Of Atom Or Odata Xml File To Odata Json File Using Python

I have been trying to convert the PowerShell script to Python code to download the list files from Sharepoint. Most of the coding part is completed and well executed as of now. How

Solution 1:

Found the solution, Instead of going with xml to json parser(xmltodict.parse) etc., the simple solution is add this "?&$format=json" to the end of the web URL.

XML_DATA_URL = https://myorg.sharepoint.com/sites/pwaeng/_api/projectdata/Tasks

JSON_FORMAT_URL = https://myorg.sharepoint.com/sites/pwaeng/_api/projectdata/Tasks?&$format=json

However, this is not working with below type of URL.

https://myorg.sharepoint.com/sites/pwaeng/_api/web/lists/GetByTitle('Program Risks')/items

https://myorg.sharepoint.com/sites/pwaeng/_api/web/lists/GetByTitle('Program Risks')/items?&$format=json

If anyone has any suggestions, Please add your comment here..

Post a Comment for "Conversion Of Atom Or Odata Xml File To Odata Json File Using Python"