JSON serialization of a table

Michael Droettboom mdroe at stsci.edu
Wed Apr 25 05:18:29 PDT 2012


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
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ivoa.net/pipermail/votable/attachments/20120425/076f2749/attachment.html>


More information about the votable mailing list