mirror of
https://github.com/gsi-upm/senpy
synced 2024-11-24 17:12:29 +00:00
Fixed turtle outformat in playground
This commit is contained in:
parent
ad2051307a
commit
8c5f894843
@ -159,15 +159,22 @@ function load_JSON(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var response = JSON.parse($.ajax({type: "GET", url: url , async: false}).responseText);
|
var response = $.ajax({type: "GET", url: url , async: false}).responseText;
|
||||||
|
rawcontainer.innerHTML = replaceURLWithHTMLLinks(response)
|
||||||
|
|
||||||
|
document.getElementById("input_request").innerHTML = "<a href='"+url+"'>"+url+"</a>"
|
||||||
|
document.getElementById("results-div").style.display = 'block';
|
||||||
|
try {
|
||||||
|
response = JSON.parse(response);
|
||||||
var options = {
|
var options = {
|
||||||
mode: 'view'
|
mode: 'view'
|
||||||
};
|
};
|
||||||
var editor = new JSONEditor(container, options, response);
|
var editor = new JSONEditor(container, options, response);
|
||||||
editor.expandAll();
|
editor.expandAll();
|
||||||
rawcontainer.innerHTML = replaceURLWithHTMLLinks(JSON.stringify(response, undefined, 2))
|
}
|
||||||
document.getElementById("input_request").innerHTML = "<a href='"+url+"'>"+url+"</a>"
|
catch(err){
|
||||||
document.getElementById("results-div").style.display = 'block';
|
console.log("Error decoding JSON (got turtle?)");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user