Sharepoint REST API - System.Text.Json.JsonReaderException

Copper Contributor

When querying a list of documents, I am receiving the following error:


System.Text.Json.JsonReaderException: ''0x07' is invalid within a JSON string. The string should be correctly escaped. LineNumber: 2013 | BytePositionInLine: 1346.'


After a lot of research I determined that the invalid character is being returned as part of the "MetaInfo" property of the list item. The property within the MetaInfo was extracted from the properties of the Word document when it was loaded into SharePoint, and this property contains the 0x07 control character. The SharePoint REST interface should sanitize and escape these characters before returning the result data, as it is otherwise returning invalid JSON data.


This is clearly a bug in SharePoint. Is there a better place for me to report this issue?


0 Replies