JSON: Difference between revisions

From OSSelot
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 35: Line 35:
<script src="/scripts/osadl.js">
<script src="/scripts/osadl.js">
</script>
</script>
<h4>Search for a package, select it, submit it to the REST interface for JSON formatted data and display the <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> curation data in a new window</h4>
<h4>For browsers with generic JSON support: Search for a package, select it, submit it to the REST interface for JSON formatted data and display the <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> curation data in a new window</h4>
<i>(Same as above, some of the packages may take a long time to render. If the browser does not know how to handle JSON code, use the below OSADL built-in display version.)</i><br />
<i>(Same as above, some of the packages may take a long time to render. If the browser does not know how to handle JSON code, use the below OSADL built-in display version.)</i><br />
<input type="text" onkeyup="searchtextkeyup(event, this, 'restjson');" size="30" /><button onclick="searchOSSelot(this, 'restjson');">Search the <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> repository</button><br />
<input type="text" onkeyup="searchtextkeyup(event, this, 'restjson');" size="30" /><button onclick="searchOSSelot(this, 'restjson');">Search the <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> repository</button><br />
Line 43: Line 43:


<html>
<html>
<h4>Search for a package, select it, let the JSON formatted <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> curation data be validated for syntax correctness and colorified, and display the code in a new window</h4>
<h4>If the browser does not generically support JSON display: Search for a package, select it, let the JSON formatted <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> curation data be validated for syntax correctness and colorified, and display the code in a new window</h4>
<i>(Also same as above, some of the packages may take a long time to render.)</i><br />
<i>(Also same as above, some of the packages may take a long time to render.)</i><br />
<input type="text" onkeyup="searchtextkeyup(event, this, 'validatejson');" size="30" /><button onclick="searchOSSelot(this, 'validatejson');">Search the <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> repository</button><br />
<input type="text" onkeyup="searchtextkeyup(event, this, 'validatejson');" size="30" /><button onclick="searchOSSelot(this, 'validatejson');">Search the <span style="font-family: OSSelot-Bold; font-weight: 500; color: #1565af;">O</span> repository</button><br />

Revision as of 06:44, 3 August 2023

Obtain curation data in JSON format

Single version

To obtain curation data of a single version of a software package in JSON format, the following REST calls may be used:

http://www.osselot.org:3262/json/<package>/<version>

or

https://www.osselot.org:3263/json/<package>/<version>

such as in a wget command

wget -qO - http://www.osselot.org:3262/json/dbus/1.15.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://wwww.osselot.org:3262/json/dbus

Format JSON file in browser

If a browser supports display of JSON data either natively or after having installed an appropriate extension, JSON data may be rendered and interactively inspected using links such as DBus version 1.15.2 or even all curated versions of DBus.

(Please note that the above browser commands, particularly the second, may take a long time to render.)

For browsers with generic JSON support: Search for a package, select it, submit it to the REST interface for JSON formatted data and display the O curation data in a new window

(Same as above, some of the packages may take a long time to render. If the browser does not know how to handle JSON code, use the below OSADL built-in display version.)


If the browser does not generically support JSON display: Search for a package, select it, let the JSON formatted O curation data be validated for syntax correctness and colorified, and display the code in a new window

(Also same as above, some of the packages may take a long time to render.)