Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
$.get('/path/to/url', function (data) {
if( !data || data === ""){
// error
return;
}
var json;
try {
json = jQuery.parseJSON(data);
} catch (e) {
// error
return;
}
// use json here
}, "text");
@rjbultitude

Neat script. This saved my bacon recently so thanks a lot. One question: why does the dataType need to be set to 'text'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.