FamilySearch/gedcomx-rs

Why is JSON support required while XML is optional?

justincy opened this issue · 2 comments

Section 4 of the GEDCOM X RS spec defines the application states, and for each one there is a statement discussing the media types:

Applications that implement the Agent state MUST support the application/x-gedcomx-v1+json media type as defined by the GEDCOM X JSON specification. Support for the application/x-gedcomx-v1+xml media type as defined by GEDCOM X XML is RECOMMENDED.

Why is support for JSON required while XML is only recommended? I'm a fan of JSON myself but this decision still sounds arbitrary to me. Is the justification for this decision documented anywhere?

We simply didn't want to place the extra burden on application developers.

If I'm developing a genealogical data application that conforms to GEDCOM X RS, it's presumably much easier to focus on one media type than it is to implement support for both media types. Along those same lines, if I'm developing a client-side library that consumes a GEDCOM X RS API, I don't have to fret about whether to choose XML or JSON.

Why JSON over XML? Because it's the de facto expectation for Web service APIs. One of the major reasons that it became the de facto expectation is that it's a lot easier for JavaScript developers to use.

That makes sense. That's what I expected. Though I still think it's odd that an XML-only API would be non-compliant.