IVOA LSST talk and JSON format for TAP

Patrick Dowler pdowler.cadc at gmail.com
Fri May 13 09:18:30 CEST 2016


I have written some generic code to output a DOM in JSON in addition
to the usual XML. It is a set of rules mostly consistent with
http://badgerfish.ning.com/ but with simpler namespace handling and
more consistent array/list output. We have it in use in vospace (for
sure) and maybe UWS (can't recall if that is released yet). I intend
to try outputting VOTable using this code... it will be more complex
than the above examples and iirc there are some structures allowed in
VOTable that don't map perfectly. I'll try to do that experiment asap
and report on what that looks like.

I do prefer a standard set of rules making XML and JSON ~equivalent
over a custom tables-in-json approach, but I'll have to try it to see
if that works...

If we can come up with a canonical VOTable-in-JSON serialisation and
define a mimetype (application/x-votable+json?) then supporting this
in any VOTable producing service should be straightforward.

On 12 May 2016 at 13:57, Grégory Mantelet
<gmantele at ari.uni-heidelberg.de> wrote:
> Hi Brian and DAL,
>
> 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:
>
> {
>     "metadata":[
>
> {"name":"...","description":"...","datatype":"...","arraysize":"...","xtype":"...","unit":"...","ucd":"...","utype":"...},
>         ...
>     ],
>     "data":[
>         [valueCol1, valueCol2, ...],
>         ...
>     ]
> }
>
>
> This output format with this above syntax is already available in the
> following services:
>     - Simbad-TAP
>     - TAP-VizieR
>     - in my coming TAP service for Gaia
>     - and probably also in other TAP services using the CDS/ARI TAP-Library.
>
> 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).
>
> Cheers,
> Grégory
>
>
> Le jeudi 12 mai 2016 à 15:17 +0000, Van Klaveren, Brian N. a écrit :
>
> Apologies if this goes through multiple times... this internet is quite
> flaky.
>
>
>
> Hi all,
>
>
> 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):
>
> https://www.dropbox.com/s/l89mpih9dmk2q3a/LSST_DAX_IVOA_Interop_May-2016.pdf?dl=0
>
>
>
> 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.
>
>
> 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:
>
>
> https://gist.github.com/brianv0/07cf0acd83bde6f450a9
>
>
> From my perspective, there's two use cases of a JSON response for TAP.
>
>
> 1. A 1:1 (or near to it) alternative to VOTable.
>
> 2. A simplified/minimal version intended to be very easy to use from
> Javascript.
>
>
> For the first case, the output of something like that might look like the
> link above.
>
>
> For the second case, a minimal representation might look like this:
>
>
> {
>
>   "columns": [
>
>      {"name":"foo", "datatype":"int"},
>
>      {"name":"bar", "datatype":"long"}
>
>      {"name":"baz", "datatype":"double"}
>
>   ],
>
>  "data" : [
>
>    [ 1, "1.12", 2.123]
>
>    [ 2, "1.34", 2.345]
>
>    [ 3, "1.56", 2.678]
>
>   ]
>
> }
>
>
> This is extremely easy to deal with via javascript.
>
>
> i.e:
>
>
> var table = $(/* call TAP here via jquery */);
>
> table.columns.forEach(function(i){ console.log(i.name)}); // log names
>
> table.rows.forEach( doSomethingWIthRow );
>
>
>
> So, if you end up talking about a JSON format, please consider these two
> potential use cases.
>
>
> Thanks,
>
> Brian
>
>
>



-- 
Patrick Dowler
Canadian Astronomy Data Centre
Victoria, BC, Canada


More information about the dal mailing list