0

appreciate if anyone can help on my below queries.

  1. SharePoint list have swagger(json) files.
  2. How to read swagger form SharePoint list through problematically. Is it possible? If possible what are the components can be use design?

Any client side /Server side/ any tool?

Please advise on how to proceed.

1

For the reason why we cannot read JSON files in SharePoint:

The .json extension in out of the box SharePoint is reserved for .json enabled web services, specifically the REST API for client side operations. Due to a handler in the web.config file for the application, if you were even able to upload your .json files, you would get errors trying to access them due to the handler intervening. The extension is blocked to maintain integrity within the SharePoint product, which is why aspx and other web formats are blocked.

The workaround i can think of is to save your json content in to a txt file and still read them from JavaScript as JSON files or consume it through your HTML file, it would not make too much difference.

It has been talked before:Why is upload of JSON files prohibited?

I can upload .json file in sharepoint site but cant access the file in SharePoint 2010

  • Thank you very much your replay boss but if we want to display as swaager file ui how can we do it – sanka jayaram Aug 20 '19 at 7:31
  • @sankajayaram If you mean the experience like an online editor inside the SP on-premise library, per my knowledge that is not doable. – jerry_MSFT Aug 20 '19 at 8:47
  • Not in library ..using through problematically to read json and present like swagger UI . but JSON file upload into SharePoint library.is there any way to do? – sanka jayaram Aug 20 '19 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.