SharePoint Online List querying with "app only" API: XML output vs JSON Output

Brass Contributor

Hi

 

We have created a new list in a modern site. This list contain a rich-text column containing string values with encoded characters like <, >. Then we try to query with "app only" API like below.

 

https://Sample.com/sites/ThanujaSite/_api/web/lists/getbytitle('SampleList')/items 

 

if the XML out put is targeted, then the output coming would look like &lt; and &gt; for the characters mentioned above which is not usable for us. However if we target JSON output, characters retrieves properly. But we need the XML output since it is to be feed on to another application for processing; and re-creating that app to accept JSON is more work for us.

 

we would like to know, if this is a limitation in SP Online now? 

 

NOTE:  graph API is not used because it always provide JSON output not the XML output. So using Graph API is a blocker for this requirement.

 

Any help appreciated

 

 

 

2 Replies

XML will encode those characters otherwise it could mess up the output. 

 

You could decode the output of that after the fact with a html.decode for whatever language you are using :)