Export formats - JSON

David A. Riggs david.a.riggs at gmail.com
Mon Jul 11 21:02:43 BST 2016


On Wed, Jun 29, 2016 at 3:19 PM, Philip Balister <philip at balister.org>
wrote:

> What need is to start moving to a standard extensible format that is
> easily usable without everyone having to write yet another parser for
> processing cave data. If we can get this format in place and hopefully
> adopted, people can process data with the program that makes them happy,
> without annoying other people who like other programs.
>

I agree with everything that Philip says, though I strongly disagree that
Metacave is such a thing.

The fact that it is JSON doesn't mean that any software can just magically
use it, it simply means that it's marked up as JSON. You've got a JSON
parser, congratulations; now you've got an array of dictionaries of arrays
of dictionaries... You need to know the structure of all the keys that you
care about. You'll also need to parse every numeric value if you want to
use it (you know, like... survey measurements) because the authors were
forced to encode them as strings, well, because Javascript.

You'll also have to do some index arithmetic, because they modeled the
actual survey measurements as an array of interleaved station "objects" and
shot "objects". It seems like the most important portion of the cave survey
was modeled after a sheet of paper rather than after the actual cave survey?

Oh, and it's "extensible" in the sense that anyone can just add whatever
they want - without any namespacing - and that makes it extensible. At
least an XML format would allow you to specify a unique namespace (see the
sadly-forgotten-by-history CaveSurvey XML schema proposed by Devin Kouts at
the turn of the century).

I hate to come across so negative, but pitching this format as a universal,
extensible standard is silly; it is Yet Another Cave Survey Format. See:
https://xkcd.com/927/

I'll at least commend the authors for documenting it well!

- DR

PS: Apologies to the Survex developers and users for this off-topic thread

-- 
David A. Riggs <david.a.riggs at gmail.com>


More information about the Survex mailing list