Skip to content

DateTime in jsonldcontext#4384

Open
madbob wants to merge 2 commits intoschemaorg:mainfrom
madbob:patch-1
Open

DateTime in jsonldcontext#4384
madbob wants to merge 2 commits intoschemaorg:mainfrom
madbob:patch-1

Conversation

@madbob
Copy link
Copy Markdown

@madbob madbob commented Mar 30, 2025

File at https://schema.org/docs/jsonldcontext.jsonld misses all "DateTime" types for every property, mostly due a mispelled case in the building script.

File at https://schema.org/docs/jsonldcontext.jsonld misses all "DateTime" types for every property, mostly due a mispelled case in the building script.
Copy link
Copy Markdown
Contributor

@gmackenz gmackenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, thanks!

@gmackenz
Copy link
Copy Markdown
Contributor

Fails in the build test.

@madbob
Copy link
Copy Markdown
Author

madbob commented Apr 24, 2025

Seems that the test itself was broken: documentation says that dateModified may be both Date or DateTime, while software/tests/test_basics.py just tested for Date and failed with the "fixed" version of jsonldcontext.jsonld.

@gmackenz
Copy link
Copy Markdown
Contributor

tests now breaks for auditDate

Copy link
Copy Markdown
Contributor

@gmackenz gmackenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test has another breakage for "auditDate"

@madbob
Copy link
Copy Markdown
Author

madbob commented Apr 25, 2025

Ok, I totally failed to properly check my pull request... Sorry...

But now, I'm a bit confused.

JSON-LD specification says something about expressing a type "with an IRI", as "a term defined in the active context", or "using an array", but omits details about the contents of the array (the only available example contains IRIs, it do not mentions terms).

On the other hand, given my limited understanding of Ruby, seems that json-ld gem only accepts a single string, in form of URI, assigned to type. Arrays seems not to be handled at all, with any content.

I've tried replacing Date and DateTime with schema:Date or fully qualified URLs as http://schema.org/Date, with no success in the validation by the json-ld gem. Probably I'm missing something, but don't know what...

@gmackenz
Copy link
Copy Markdown
Contributor

Not sure what value the test_basics for "Date" has and if we should keep it.

@gmackenz
Copy link
Copy Markdown
Contributor

Anyone else have some background on test or what should be done?

@github-actions
Copy link
Copy Markdown

This pull request is being nudged due to inactivity.

@github-actions github-actions Bot added the no-pr-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!). label Jul 31, 2025
@rrlevering
Copy link
Copy Markdown
Contributor

Based on my read, the @type in JSON-LD context is a data/value type (or it would be type @id), so it's like the type of a typed literal in RDF. So it really can't have multiple values in that definition. It's not like a node type where JSON-LD allows multiple values. So I don't really understand what you would put here if it could be either data type. In Google's internal context file, we don't generate these types at all. So I guess I would rather we just get rid of the declaration in that case. Maybe someone with more background can take a stab here though.

@github-actions github-actions Bot removed the no-pr-activity Discuss has gone quiet. Auto-tagging to encourage people to re-engage with the issue (or close it!). label Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants