JSON: Difference between revisions
Jump to navigation
Jump to search
(Created initial content) |
No edit summary |
||
Line 21: | Line 21: | ||
<script> | <script> | ||
function loadJSON(url) | function loadJSON(anchor, url) | ||
{ | { | ||
if (window.XMLHttpRequest) | if (window.XMLHttpRequest) | ||
Line 37: | Line 37: | ||
a.href = URL.createObjectURL(blob); | a.href = URL.createObjectURL(blob); | ||
a.setAttribute("target", "_blank"); | a.setAttribute("target", "_blank"); | ||
anchor.appendChild(a); | |||
a.click(); | a.click(); | ||
a.remove(); | a.remove(); | ||
Line 47: | Line 48: | ||
</script> | </script> | ||
<a onclick="loadJSON('https://www.osselot.org/json.php?angular/version-15.2.2');">https://www.osselot.org/json.php?angular/version-15.2.2</a> | <a onclick="loadJSON(this, 'https://www.osselot.org/json.php?angular/version-15.2.2');">https://www.osselot.org/json.php?angular/version-15.2.2</a> | ||
</html> | </html> |
Revision as of 01:10, 25 July 2023
Obtain curation data in JSON format
Single version
To obtain curation data of a single version of a software package, the following URL may be used: http://osselot.org/json.php?<package>/version-<version> such as in a wget command
wget -qO - http://osselot.org/json.php?angular/version-15.2.2
All available versions of a software package
The command to obtain JSON formatted data of all available versions of a software package is very similar to the above except that the "version" part is not given such as
wget -qO - http://osselot.org/json.php?angular
Format JSON file in browser
If your browser supports display of JSON data either natively or after having installed an appropriate extension, you may immediately browse to the URL such as https://www.osselot.org/json.php?angular/version-15.2.2