HUPO-PSI / mzQC

Reporting and exchange format for mass spectrometry quality control data
https://hupo-psi.github.io/mzQC/
Creative Commons Attribution 4.0 International
27 stars 13 forks source link

Discuss format for date-time fields in mzQC #213

Closed nilshoffmann closed 1 year ago

nilshoffmann commented 1 year ago

According to json schema definition https://json-schema.org/draft/2020-12/json-schema-validation.html#section-7.3.1, the format for date-time field follows https://www.rfc-editor.org/rfc/rfc3339.html#section-5.6

This requires explicit statement of either Z for UTC or a time zone offset. Omission is not valid.

mwalzer commented 1 year ago

Somewhat related the URI used in the format. Maybe we could add a small and clarifying section to the spec doc for that, too. URIs and timezones are mundane things kept for granted but the RFCs hold some surprise. A convenience 'refresher' on the essential thing for each. (https://www.rfc-editor.org/rfc/rfc3986)

bittremieux commented 1 year ago

Nice catch! For automatic syntactic validation I'd say to follow the JSON requirements (so include "Z"). The specification document should be updated accordingly.

mwalzer commented 1 year ago

Following our initial discussions here and off-line, I've drafted some change to the spec doc, to discuss something concrete next. The URIs did not get any extra text, I opted for simply linking the RFC at each occurrence of URI. That should be convenience enough.

cbielow commented 1 year ago

Nice catch! For automatic syntactic validation I'd say to follow the JSON requirements (so include "Z"). The specification document should be updated accordingly.

I'm 100% with you, but we should check (at least roughly) that all common implementations/parsers, which we are using can deal with the formatting required by the JSON schema definition. It would be counter-productive IMHO to obey the schema definition, but fail in real world scenarios.