JSON serialization of a table

Bob Mann rgm at roe.ac.uk
Wed Apr 25 06:38:11 PDT 2012


Folks,

Please forgive the technically-uninformed question, but is there a way 
to make consistent format specifications in XML Schema and JSON Schema? 
- and, ideally, for automatically translating between instance documents 
of the two?

I can definitely see the case for a standard JSON specification for a 
table, but it won't replace VOTable, and we saw from the initial XML and 
string variants of ADQL how difficult it is to keep parallel standards 
in step.

Bob Mann


On 25/04/2012 13:18, Michael Droettboom wrote:
> I think a lot of the concepts in (XML) VOTable can map fairly 
> naturally into JSON (as you've done in your example).  I would highly 
> recommend using JSON Schema [1] as a way of defining this JSON 
> dialect, whatever it turns out to look like.  We're starting to use 
> that in some other projects we're working on, and I've been very 
> impressed by how simple-yet-powerful the standard is.  Don't be scared 
> away by the fact that schemas in the XML world are often an 
> over-complicated mess: I think JSON Schema handily fits in one's brain.
>
> Having a way to automatically validate the data in a 
> language-independent way turns out to be very useful when defining a 
> format that will have multiple software implementations reading and 
> writing it.  We did an experiment over about 22 thousand VOTable XML 
> queries [2], and about 20% of the results were invalid against the 
> VOTable XML Schema.  (Which seems to suggest that many authors writing 
> software for VOTable are not aware of the schema, or are not using 
> it.)  About 90% were invalid for some other reason, so schemas are not 
> the entire solution, particularly for a format like VOTable XML where 
> the type of the data elements is dependent on metadata specified far 
> away from it in the file.
>
> [1] http://tools.ietf.org/html/draft-zyp-json-schema-03
> [2] http://stsdas.stsci.edu/astrolib/vo_compliance_tests/
>
> Mike Droettboom
>
> On 04/25/2012 04:20 AM, Thomas Boch wrote:
>> Hi all,
>>
>> With the increase of applications running in the browser, each 
>> project is defining its own JSON serialization of a table (see the 
>> attached file for an example).
>> I was wondering if, for interoperability purposes, there would be a 
>> benefit in defining a standard JSON serialization of an astronomical 
>> table. Any opinion on this ?
>> Cheers,
>>
>> Thomas
>>
>


-- 

=============================================================
Bob Mann                                Tel: +44-131-668-8338
Institute for Astronomy                 Fax: +44-131-668-8416
University of Edinburgh               Email: rgm at roe.ac.uk
Royal Observatory
Blackford Hill
Edinburgh EH9 3HJ

"The University of Edinburgh is a charitable body, registered
in Scotland, with registration number SC005336."
=============================================================






-- 
Scanned by iCritical.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ivoa.net/pipermail/votable/attachments/20120425/738df938/attachment.html>


More information about the votable mailing list