<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/4.8.5">
</HEAD>
<BODY>
Hi Brian and DAL,<BR>
<BR>
In the CDS/ARI TAP-Library, I also provide for some time now a JSON output. Let just me share as well the syntax I have chosen for this output format:<BR>
<BR>
<PRE>
{
"metadata":[
{"name":"...","description":"...","datatype":"...","arraysize":"...","xtype":"...","unit":"...","ucd":"...","utype":"...},
...
],
"data":[
[valueCol1, valueCol2, ...],
...
]
}
</PRE>
<BR>
This output format with this above syntax is already available in the following services:<BR>
- Simbad-TAP<BR>
- TAP-VizieR<BR>
- in my coming TAP service for Gaia<BR>
- and probably also in other TAP services using the CDS/ARI TAP-Library.<BR>
<BR>
As you can see, my syntax is really not so far from yours. I think that maybe some other TAP service implementors can share their version as well, so that we can all agree on a same syntax ; maybe this could be something to put as an appendix or implementation note in TAP (...or something else if you have better idea).<BR>
<BR>
Cheers,<BR>
Grégory<BR>
<BR>
Le jeudi 12 mai 2016 à 15:17 +0000, Van Klaveren, Brian N. a écrit :<BR>
<BLOCKQUOTE TYPE=CITE>
Apologies if this goes through multiple times... this internet is quite flaky.<BR>
<BR>
<BR>
<BR>
Hi all,<BR>
<BR>
<BR>
If you are interested in my presentation about LSST and TAP/ADQL, i've uploaded the PDF to dropbox right now (until I can get it on the wiki):<BR>
<BR>
<A HREF="https://www.dropbox.com/s/l89mpih9dmk2q3a/LSST_DAX_IVOA_Interop_May-2016.pdf?dl=0">https://www.dropbox.com/s/l89mpih9dmk2q3a/LSST_DAX_IVOA_Interop_May-2016.pdf?dl=0</A><BR>
<BR>
<BR>
<BR>
Also, not sure if I'm going to make it to the meeting later, I need to take care of a few things for work as people in the US wake up and need a decent connection.<BR>
<BR>
<BR>
That said, if you end up talking about JSON, I was just going to post my example JSON response format for TAP and mention a few things about it:<BR>
<BR>
<BR>
<A HREF="https://gist.github.com/brianv0/07cf0acd83bde6f450a9">https://gist.github.com/brianv0/07cf0acd83bde6f450a9</A><BR>
<BR>
<BR>
From my perspective, there's two use cases of a JSON response for TAP. <BR>
<BR>
<BR>
1. A 1:1 (or near to it) alternative to VOTable.<BR>
<BR>
2. A simplified/minimal version intended to be very easy to use from Javascript.<BR>
<BR>
<BR>
For the first case, the output of something like that might look like the link above.<BR>
<BR>
<BR>
For the second case, a minimal representation might look like this:<BR>
<BR>
<BR>
{<BR>
<BR>
"columns": [<BR>
<BR>
{"name":"foo", "datatype":"int"},<BR>
<BR>
{"name":"bar", "datatype":"long"}<BR>
<BR>
{"name":"baz", "datatype":"double"}<BR>
<BR>
],<BR>
<BR>
"data" : [<BR>
<BR>
[ 1, "1.12", 2.123]<BR>
<BR>
[ 2, "1.34", 2.345]<BR>
<BR>
[ 3, "1.56", 2.678]<BR>
<BR>
]<BR>
<BR>
}<BR>
<BR>
<BR>
This is extremely easy to deal with via javascript. <BR>
<BR>
<BR>
i.e:<BR>
<BR>
<BR>
var table = $(/* call TAP here via jquery */);<BR>
<BR>
table.columns.forEach(function(i){ console.log(i.name)}); // log names<BR>
<BR>
table.rows.forEach( doSomethingWIthRow );<BR>
<BR>
<BR>
<BR>
So, if you end up talking about a JSON format, please consider these two potential use cases.<BR>
<BR>
<BR>
Thanks,<BR>
<BR>
Brian​<BR>
<BR>
<BR>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>