Skip to content

Instantly share code, notes, and snippets.

@quirkey
Created September 29, 2010 22:32
Show Gist options
  • Save quirkey/603689 to your computer and use it in GitHub Desktop.
Save quirkey/603689 to your computer and use it in GitHub Desktop.
parseResponse: function(response) {
try {
if (typeof response == "string") {
return JSON.parse($(response).text());
} else {
return response;
}
} catch(e) {
Sammy.log("parseResponse Error:", response, e);
return {};
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment