Closed nilshoffmann closed 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)
Nice catch! For automatic syntactic validation I'd say to follow the JSON requirements (so include "Z"). The specification document should be updated accordingly.
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.
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.
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.