0

We have a html file in a Document Library which contains a large html table with useful info. (this files is exported manually from a different app) The info would be even more useful/accessible if it was in json format. (far faster to load and more accessible) The use case would be :

  • User uploads more recent file html file to the document library
  • User goes to a wikipage on the sharepoint site and clicks on a large button "Update JSON"
  • A javascript does the following
    • reads the contents of the html file
    • generates valid json
    • saves this json to an existing .json file in the document library, overwriting the current contents

Any ideas ??

Thanks / Colm

P.S. Everything has to be client-side, javascript is the only option.

carbontracking
  • 1,029
  • 4
  • 17
  • 33
  • What do you mean with "saves this json"? Do you know you can only save files in a client-side sandbox and only with the browsers supporting it? – MaxArt Dec 04 '12 at 11:30
  • The json is saved to an existing file in a Document library on the sharepoint server, not locally. – carbontracking Dec 04 '12 at 12:59
  • Ok, but you can't do this with Javascript alone. You need some server-side handler to perform that. So, back to the original question: what do you mean with "saves this json"? Should it send an AJAX request or what? – MaxArt Dec 04 '12 at 14:29

1 Answers1

0

I encountered some link for similar task, hopefully it would help you to some extent.

http://dannyjessee.com/blog/index.php/2013/02/using-jsom-to-write-small-files-to-a-sharepoint-2013-document-library/

Arvind
  • 61
  • 3