VOEvent Update: JSON and data models

Roy Williams roy at roe.ac.uk
Tue Oct 17 11:24:00 CEST 2017


I would like to point out that there are two independent ideas in the Note that we circulated:
-- The idea of using JSON as an alternate format
-- The idea that Groups of Params and Tables can be used as data models

These are independent of each other. The data models can be just as well implemented in XML. I have not heard any complaints about the data models. Should I split the Note into two pieces for separate consideration?

Reasons for using JSON. Perhaps (5) is the most important, followed by (6), which is really a question.

(1) JSON and XML can be used together, and pretty much interchanged. Certainly I have had little trouble making an XML-to-JSON converter. However, I will say that we put in a few simplifications that might not convert back easily. For example instead of saying Name1=RA and C1=300 (the XML), we just say RA=300 (the JSON). This means that there is no longer a choice of name, so if you want to call it RiteAscenshun in XML, and it gets converted to JSON and back to XML, then it will come out being called RA. We have also defaulted the units to degrees and meters in the WhereWhen section.

(2) There is no longer the confusion over what is text and what is attributes that XML has. Instead of <tag att=hello>dolly</tag>, we convert to att=hello and tag=dolly.

(3) I like the way Tim refers to XML as Betamax. Many people I have talked to prefer JSON. It is a matter of taste I suppose.

(4) If we are encouraged by the IVOA, it is our intention to build a JSON schema that can be used to validate the content. Once there is a schema, the JSON is much more constrained. JSON can also be "schema-compliant"

(5) The future high-volume transient surveys are proposing to use a format called AVRO, that is very much like JSON, to transport event notices. There are technical efficiencies such as binary encoding, and in particular the ability to put binary values in the notice -- image cutouts. The AVRO schema is written in JSON, and is quite close to the JSON schema alluded in (4). Thus VOEvent is brought in line with the ZTF and LSST projects.

(6) If encouraged by the IVOA, we could shift attention from JSON and work directly with its cousin, AVRO.

Thank you for your attention
Roy (with Eric, Matthew, Rob, and Scott)


More information about the voevent mailing list