Skip to content

Instantly share code, notes, and snippets.

@freedmo
Created March 16, 2014 03:08
Show Gist options
  • Save freedmo/9578009 to your computer and use it in GitHub Desktop.
Save freedmo/9578009 to your computer and use it in GitHub Desktop.
function GW2TESTING(){
var myUrl = "http://www.gw2spidy.com/api/v0.9/json/all-items/*all*";
var jsonData = UrlFetchApp.fetch(myUrl);
var jsonString = jsonData.getContentText();
jsonString.replace(/\\n/g, "\\n");
jsonString.replace(/\\'/g, "\\'");
jsonString.replace(/\\"/g, '\\"');
jsonString.replace(/\\&/g, "\\&");
jsonString.replace(/\\r/g, "\\r");
jsonString.replace(/\\t/g, "\\t");
jsonString.replace(/\\b/g, "\\b");
jsonString.replace(/\\f/g, "\\f");
//jsonString = jsonString.escape();
var jsonObject = JSON.parse(jsonString);
//Controll value
return jsonObject.count;
}
@freedmo
Copy link
Author

freedmo commented Mar 16, 2014

Error in line 17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment