Last active
December 14, 2015 02:19
-
-
Save lmatteis/5013182 to your computer and use it in GitHub Desktop.
RDFtoJSONP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doGet(e) { | |
var url = e.parameter.url; | |
var content = UrlFetchApp.fetch(url).getContentText(); | |
var jsonString = JSON.stringify(content); | |
return ContentService.createTextOutput() | |
.setMimeType(ContentService.MimeType.JSON) | |
.setContent(e.parameter.callback + '(' + jsonString + ');'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
?url=http://example.com/ontology#termName
to the end of this url.&callback=foo
paramater.For example, with jQuery you could use this as:
note remember to replace the App Script URL (https://script.google.com/macros/s/AKF..../exec) with your own Apps Script URL .